llvm-project/llvm/test/CodeGen
Jessica Paquette d0ba6c4002 [AArch64][GlobalISel] Select CSINC and CSINV for G_SELECT with constants
Select the following:

- G_SELECT cc, 0, 1 -> CSINC zreg, zreg, cc
- G_SELECT cc 0, -1 -> CSINV zreg, zreg cc
- G_SELECT cc, 1, f -> CSINC f, zreg, inv_cc
- G_SELECT cc, -1, f -> CSINV f, zreg, inv_cc
- G_SELECT cc, t, 1 -> CSINC t, zreg, cc
- G_SELECT cc, t, -1 -> CSINC t, zreg, cc

(IR example: https://godbolt.org/z/YfPna9)

These correspond to a bunch of the AArch64csel patterns in AArch64InstrInfo.td.

Unfortunately, it doesn't seem like we can import patterns that use NZCV like
those ones do. E.g.

```
def : Pat<(AArch64csel GPR32:$tval, (i32 1), (i32 imm:$cc), NZCV),
          (CSINCWr GPR32:$tval, WZR, (i32 imm:$cc))>;
```

So we have to manually select these for now.

This replaces `selectSelectOpc` with an `emitSelect` function, which performs
these optimizations.

Differential Revision: https://reviews.llvm.org/D90701
2020-11-12 14:44:01 -08:00
..
AArch64 [AArch64][GlobalISel] Select CSINC and CSINV for G_SELECT with constants 2020-11-12 14:44:01 -08:00
AMDGPU [AMDGPU] Enable multi-dword flat scratch load/stores 2020-11-12 13:38:56 -08:00
ARC
ARM [ARM] Fix PR 47980: Use constrainRegClass during foldImmediate opt. 2020-11-10 13:38:11 -08:00
AVR [AVR] Improve inline rotate/shift expansions 2020-10-31 23:15:49 +01:00
BPF [NewPM] Provide method to run all pipeline callbacks, used for -O0 2020-11-11 15:10:27 -08:00
Generic [Annotation] Allows annotation to carry some additional constant arguments. 2020-10-26 10:50:05 +01:00
Hexagon [Hexagon] Handle additional shuffles that can be made perfect 2020-10-29 19:09:00 -05:00
Inputs
Lanai
MIR Revert "Revert "[AMDGPU] Reorganize GCN subtarget features for unaligned access"" 2020-11-11 14:40:14 +00:00
MSP430
Mips [DAG][ARM][MIPS][RISCV] Improve funnel shift promotion to use 'double shift' patterns 2020-10-12 14:11:02 +01:00
NVPTX [TargetLowering] Add i1 condition for bit comparison fold 2020-10-27 12:22:20 +00:00
PowerPC [PowerPC] Accumulator/Unprimed Accumulator register copy, spill and restore 2020-11-11 16:23:45 -06:00
RISCV [RISCV] Add an ANDI to shift amount of FSL/FSR instructions 2020-11-12 07:33:40 -08:00
SPARC [Sparc] fp16-promote.ll - Refactor check prefixes + remove unused ones 2020-11-11 18:38:22 +00:00
SystemZ [SystemZ] Regenerate some fp tests + remove unused check prefixes 2020-11-11 18:38:22 +00:00
Thumb
Thumb2 [ARM] Ensure CountReg definition dominates InsertPt when creating t2DoLoopStartTP 2020-11-12 13:47:46 +00:00
VE [VE] Support vld intrinsics 2020-11-13 07:34:42 +09:00
WebAssembly [WebAssembly] Don't fold frame offset for global addresses 2020-11-03 14:56:25 -08:00
WinCFGuard Revert "Reland [CFGuard] Add address-taken IAT tables and delay-load support" 2020-11-11 16:03:33 +01:00
WinEH
X86 [CodeGen][X86] Remove unused check-prefixes from vec tests. NFCI. 2020-11-11 15:32:42 +08:00
XCore