llvm-project/llvm/lib/Transforms/InstCombine
Sanjay Patel 5094e1279e [InstCombine] fold min/max intrinsic with negated operand to abs
The smax case shows up in https://llvm.org/PR49885 .
The others seem unlikely, but we might as well try
for uniformity (although that could mean an extra
instruction to create "nabs").

smax -- https://alive2.llvm.org/ce/z/8yYaGy
smin -- https://alive2.llvm.org/ce/z/0_7zc_
umax -- https://alive2.llvm.org/ce/z/EcsZWs
umin -- https://alive2.llvm.org/ce/z/Xw6WvB
2021-04-08 14:37:39 -04:00
..
CMakeLists.txt llvmbuildectomy - replace llvm-build by plain cmake 2020-11-13 10:35:24 +01:00
InstCombineAddSub.cpp [InstCombine] foldAddWithConstant(): don't deal with non-immediate constants 2021-04-07 19:50:19 +03:00
InstCombineAndOrXor.cpp [InstCombine] fold not ops around min/max intrinsics 2021-04-07 17:31:36 -04:00
InstCombineAtomicRMW.cpp Add missing namespace closure comments. NFCI. 2020-09-23 16:19:25 +01:00
InstCombineCalls.cpp [InstCombine] fold min/max intrinsic with negated operand to abs 2021-04-08 14:37:39 -04:00
InstCombineCasts.cpp Replace calls to IntrinsicInst::Create with CallInst::Create [nfc] 2021-04-06 13:23:58 -07:00
InstCombineCompares.cpp [InstCombine] fold fcmp-of-copysign idiom 2021-02-17 10:32:33 -05:00
InstCombineInternal.h [InstCombine] matchBSwapOrBitReverse - remove pattern matching early-out. NFCI. 2021-02-20 13:15:34 +00:00
InstCombineLoadStoreAlloca.cpp [Loads] Add optimized FindAvailableLoadedValue() overload (NFCI) 2021-02-21 18:42:56 +01:00
InstCombineMulDivRem.cpp [InstCombine] fold fdiv with powi divisor (PR49147) 2021-02-24 16:44:36 -05:00
InstCombineNegator.cpp [Transforms] Use range-based for loops (NFC) 2021-02-08 22:33:53 -08:00
InstCombinePHI.cpp [InstCombine] Simplify phis with incoming pointer-casts. 2021-03-09 11:40:18 +00:00
InstCombineSelect.cpp [InstCombine] avoid infinite loop from partial undef vectors 2021-04-07 12:18:12 -04:00
InstCombineShifts.cpp [InstCombine] dropRedundantMaskingOfLeftShiftInput(): check that adding shift amounts doesn't overflow (PR49778) 2021-04-04 23:26:41 +03:00
InstCombineSimplifyDemanded.cpp [InstCombine] Fix out-of-bounds ashr(shl) optimization 2021-04-02 13:45:11 +02:00
InstCombineVectorOps.cpp [InstCombine] Add a combine for a shuffle of similar bitcasts 2021-03-08 16:32:30 +00:00
InstructionCombining.cpp Use AssumeInst in a few more places [nfc] 2021-04-06 13:18:53 -07:00