llvm-project/llvm/lib/Transforms/InstCombine
Sanjay Patel 9907d3c8b4 [InstCombine] canonicalize add/sub with bool
add A, sext(B) --> sub A, zext(B)

We have to choose 1 of these forms, so I'm opting for the
zext because that's easier for value tracking.

The backend should be prepared for this change after:
D57401
rL353433

This is also a preliminary step towards reducing the amount
of bit hackery that we do in IR to optimize icmp/select.
That should be waiting to happen at a later optimization stage.

The seeming regression in the fuzzer test was discussed in:
D58359

We were only managing that fold in instcombine by luck, and
other passes should be able to deal with that better anyway.

llvm-svn: 354748
2019-02-24 16:57:45 +00:00
..
CMakeLists.txt [InstCombine] Optimize `atomicrmw <op>, 0` into `load atomic` when possible 2019-02-07 21:27:23 +00:00
InstCombineAddSub.cpp [InstCombine] canonicalize add/sub with bool 2019-02-24 16:57:45 +00:00
InstCombineAndOrXor.cpp [InstCombine] Fix matchRotate bug when one operand is a ConstantExpr shift 2019-02-11 19:26:27 +00:00
InstCombineAtomicRMW.cpp [InstCombine] Address a couple stylistic issues pointed out by reviewer [NFC] 2019-02-15 21:31:39 +00:00
InstCombineCalls.cpp [InstCombine] Fix an unused variable warning. 2019-02-10 02:21:29 +00:00
InstCombineCasts.cpp Extra processing for BitCast + PHI in InstCombine 2019-02-09 01:44:28 +00:00
InstCombineCompares.cpp [InstCombine] Fix crashing from (icmp (bitcast ([su]itofp X)), Y) 2019-02-07 21:12:01 +00:00
InstCombineInternal.h Implementation of asm-goto support in LLVM 2019-02-08 20:48:56 +00:00
InstCombineLoadStoreAlloca.cpp [opaque pointer types] Pass value type to GetElementPtr creation. 2019-02-01 20:44:47 +00:00
InstCombineMulDivRem.cpp [CallSite removal] Remove CallSite uses from InstCombine. 2019-01-31 17:23:29 +00:00
InstCombinePHI.cpp [opaque pointer types] Pass value type to LoadInst creation. 2019-02-01 20:44:24 +00:00
InstCombineSelect.cpp [InstCombine] reduce even more unsigned saturated add with 'not' op 2019-02-19 22:14:21 +00:00
InstCombineShifts.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
InstCombineSimplifyDemanded.cpp [InstCombine] Cleanup the TFE/LWE check in AMDGPU SimplifyDemanded 2019-02-04 21:24:19 +00:00
InstCombineTables.td InstCombine/AMDGPU: Add dimension-aware image intrinsics to SimplifyDemanded 2018-06-21 13:37:31 +00:00
InstCombineVectorOps.cpp [InstCombine] limit extracting shuffle transform based on uses 2019-02-05 22:58:45 +00:00
InstructionCombining.cpp [InstCombine] fix crash while trying to narrow a binop of shuffles (PR40734) 2019-02-15 16:31:55 +00:00
LLVMBuild.txt Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00