llvm-project/llvm/lib/Transforms/InstCombine
Sanjay Patel 6357ccf57f [InstCombine] reassociate min/max intrinsics with constant operands
Integer min/max operations are associative:
  max (max X, C0), C1 --> max X, (max C0, C1) --> max X, NewC

https://alive2.llvm.org/ce/z/wW5HVM

This would avoid a regression when we canonicalize to min/max intrinsics
(see D98152 ).

Differential Revision: https://reviews.llvm.org/D119754
2022-02-15 08:31:23 -05:00
..
CMakeLists.txt llvmbuildectomy - replace llvm-build by plain cmake 2020-11-13 10:35:24 +01:00
InstCombineAddSub.cpp Revert "Rename llvm::array_lengthof into llvm::size to match std::size from C++17" 2022-01-26 16:55:53 +01:00
InstCombineAndOrXor.cpp [InstCombine] Remove manual debug loc transfer 2022-02-14 11:07:05 +01:00
InstCombineAtomicRMW.cpp Add missing namespace closure comments. NFCI. 2020-09-23 16:19:25 +01:00
InstCombineCalls.cpp [InstCombine] reassociate min/max intrinsics with constant operands 2022-02-15 08:31:23 -05:00
InstCombineCasts.cpp Tweak some uses of std::iota to skip initializing the underlying storage. NFCI. 2022-02-04 17:00:50 +01:00
InstCombineCompares.cpp [InstCombine] Check type compatibility in indexed load fold 2022-02-11 10:16:27 +01:00
InstCombineInternal.h [InstCombine] Check type compatibility in indexed load fold 2022-02-11 10:16:27 +01:00
InstCombineLoadStoreAlloca.cpp [InstCombine] Avoid pointer element type access in PointerReplacer 2022-01-27 12:28:32 +01:00
InstCombineMulDivRem.cpp [InstCombine] try to fold binop with phi operands 2022-01-22 15:00:06 -05:00
InstCombineNegator.cpp [InstCombine] Fold sub(Y,and(lshr(X,C),1)) --> add(ashr(shl(X,(BW-1)-C),BW-1),Y) (PR53610) 2022-02-15 13:24:20 +00:00
InstCombinePHI.cpp [InstCombine] Check source element type in phi of gep fold 2022-02-11 14:26:18 +01:00
InstCombineSelect.cpp [InstCombine] Check GEP source type in select of gep fold 2022-02-14 11:46:45 +01:00
InstCombineShifts.cpp [InstCombine] try to fold binop with phi operands 2022-01-22 15:00:06 -05:00
InstCombineSimplifyDemanded.cpp [InstCombine] reduce mul operands based on undemanded high bits 2022-02-10 08:10:22 -05:00
InstCombineVectorOps.cpp [InstCombine] Use GEP type instead of pointee type 2021-12-28 14:57:43 +01:00
InstructionCombining.cpp [InstCombine] Check source element type in gep of phi of gep fold 2022-02-11 17:10:48 +01:00