forked from OSchip/llvm-project
![]() This is a patch that folds select of select to salvage some optimizations after select -> and/or folding is disabled. ``` select (select a, true, b), c, false -> select a, c, false select c, (select a, true, b), false -> select c, a, false if c implies that b is false (isImpliedCondition). ``` https://alive2.llvm.org/ce/z/ANatjt, https://alive2.llvm.org/ce/z/rv8zTB ``` sel (sel c, a, false), true, (sel !c, b, false) -> sel c, a, b sel (sel !c, a, false), true, (sel c, b, false) -> sel c, b, a ``` https://alive2.llvm.org/ce/z/U2kp-t, https://alive2.llvm.org/ce/z/bc88EE See D101191 Reviewed By: nikic Differential Revision: https://reviews.llvm.org/D101375 |
||
---|---|---|
.. | ||
CMakeLists.txt | ||
InstCombineAddSub.cpp | ||
InstCombineAndOrXor.cpp | ||
InstCombineAtomicRMW.cpp | ||
InstCombineCalls.cpp | ||
InstCombineCasts.cpp | ||
InstCombineCompares.cpp | ||
InstCombineInternal.h | ||
InstCombineLoadStoreAlloca.cpp | ||
InstCombineMulDivRem.cpp | ||
InstCombineNegator.cpp | ||
InstCombinePHI.cpp | ||
InstCombineSelect.cpp | ||
InstCombineShifts.cpp | ||
InstCombineSimplifyDemanded.cpp | ||
InstCombineVectorOps.cpp | ||
InstructionCombining.cpp |