[all-commits] [llvm/llvm-project] 5bc0bd: [AArch64][GlobalISel] Fold G_XOR x, -1 into G_SELE...
Jessica Paquette via All-commits
all-commits at lists.llvm.org
Mon Nov 16 14:14:40 PST 2020
Branch: refs/heads/master
Home: https://github.com/llvm/llvm-project
Commit: 5bc0bd05e6a8d788e08cdf3d154f3a33202aee53
https://github.com/llvm/llvm-project/commit/5bc0bd05e6a8d788e08cdf3d154f3a33202aee53
Author: Jessica Paquette <jpaquette at apple.com>
Date: 2020-11-16 (Mon, 16 Nov 2020)
Changed paths:
M llvm/lib/Target/AArch64/GISel/AArch64InstructionSelector.cpp
M llvm/test/CodeGen/AArch64/GlobalISel/select-select.mir
Log Message:
-----------
[AArch64][GlobalISel] Fold G_XOR x, -1 into G_SELECT and select CSINV
When we see
```
xor = G_XOR xor_lhs, -1
select = G_SELECT cc, tval, xor
```
Fold this into
```
select = CSINV tval, xor_lhs, cc
```
Update select-select.mir to reflect the changes.
For now, only handle the case where the G_XOR is the false-value for the
G_SELECT. It may make more sense to handle the true-value case in post-legalizer
lowering.
Differential Revision: https://reviews.llvm.org/D90774
More information about the All-commits
mailing list