-
- Downloads
[InstCombine] fold more constant divisor to select-of-constants divisor
By adding a parameter to function FoldOpIntoSelect, we can fold more Ops to Select. For this example, we tend to fold the division instruction, so we no longer care whether SelectInst is one use. This patch slove TODO left in InstCombine/div.ll. Reviewed By: RKSimon Differential Revision: https://reviews.llvm.org/D122967
Showing
- llvm/lib/Transforms/InstCombine/InstCombineInternal.h 2 additions, 1 deletionllvm/lib/Transforms/InstCombine/InstCombineInternal.h
- llvm/lib/Transforms/InstCombine/InstCombineMulDivRem.cpp 2 additions, 1 deletionllvm/lib/Transforms/InstCombine/InstCombineMulDivRem.cpp
- llvm/lib/Transforms/InstCombine/InstructionCombining.cpp 4 additions, 4 deletionsllvm/lib/Transforms/InstCombine/InstructionCombining.cpp
- llvm/test/Transforms/InstCombine/div.ll 2 additions, 6 deletionsllvm/test/Transforms/InstCombine/div.ll
Loading
Please register or sign in to comment