llvm-project/llvm/test/CodeGen
Jessica Paquette 49537bbf74 [GlobalISel][AArch64] Fold G_SUB into G_ICMP when it's safe to do so
Basically porting over the behaviour in AArch64ISelLowering to GISel. See
emitComparison for reference.

When we have something like this:

```
  lhs = G_SUB 0, y
  ...
  G_ICMP lhs, rhs
```

We can fold away the G_SUB and produce a cmn instead, given that we produce
the same value in NZCV.

Add a test showing that the transformation works, and also showing that we
don't perform the transformation when it's unsafe.

Also factor out the CSet emission into emitCSetForICMP.

Differential Revision: https://reviews.llvm.org/D63163

llvm-svn: 363596
2019-06-17 18:40:06 +00:00
..
AArch64 [GlobalISel][AArch64] Fold G_SUB into G_ICMP when it's safe to do so 2019-06-17 18:40:06 +00:00
AMDGPU [AMDGPU] gfx1010 wavefrontsize intrinsic folding 2019-06-17 17:57:50 +00:00
ARC [lit] Delete empty lines at the end of lit.local.cfg NFC 2019-06-17 09:51:07 +00:00
ARM [DAGCombiner] [CodeGenPrepare] More comprehensive GEP splitting 2019-06-17 10:54:12 +00:00
AVR [lit] Delete empty lines at the end of lit.local.cfg NFC 2019-06-17 09:51:07 +00:00
BPF [BPF] generate R_BPF_NONE relocation for BTF DataSec variables 2019-05-26 21:26:06 +00:00
Generic [lit] Delete empty lines at the end of lit.local.cfg NFC 2019-06-17 09:51:07 +00:00
Hexagon [SCEV] Use NoWrapFlags when expanding a simple mul 2019-06-17 10:05:18 +00:00
Inputs
Lanai [lit] Delete empty lines at the end of lit.local.cfg NFC 2019-06-17 09:51:07 +00:00
MIR [lit] Delete empty lines at the end of lit.local.cfg NFC 2019-06-17 09:51:07 +00:00
MSP430 [lit] Delete empty lines at the end of lit.local.cfg NFC 2019-06-17 09:51:07 +00:00
Mips [lit] Delete empty lines at the end of lit.local.cfg NFC 2019-06-17 09:51:07 +00:00
NVPTX SelectionDAG: accommodate atomic floating stores. 2019-05-10 11:23:04 +00:00
PowerPC [lit] Delete empty lines at the end of lit.local.cfg NFC 2019-06-17 09:51:07 +00:00
RISCV [DAGCombiner] [CodeGenPrepare] More comprehensive GEP splitting 2019-06-17 10:54:12 +00:00
SPARC [lit] Delete empty lines at the end of lit.local.cfg NFC 2019-06-17 09:51:07 +00:00
SystemZ [DAGCombiner] [CodeGenPrepare] More comprehensive GEP splitting 2019-06-17 10:54:12 +00:00
Thumb [lit] Delete empty lines at the end of lit.local.cfg NFC 2019-06-17 09:51:07 +00:00
Thumb2 [lit] Delete empty lines at the end of lit.local.cfg NFC 2019-06-17 09:51:07 +00:00
WebAssembly [WebAssembly] Limit PIC support to the Emscripten target 2019-06-05 20:01:01 +00:00
WinCFGuard
WinEH [lit] Delete empty lines at the end of lit.local.cfg NFC 2019-06-17 09:51:07 +00:00
X86 [X86][SSE] Scalarize under-aligned XMM vector nt-stores (PR42026) 2019-06-17 18:20:04 +00:00
XCore [lit] Delete empty lines at the end of lit.local.cfg NFC 2019-06-17 09:51:07 +00:00