[llvm] [InstCombine] Fold selection between less than zero and one (PR #69961)

via llvm-commits llvm-commits at lists.llvm.org
Tue Nov 14 02:01:09 PST 2023


XChy wrote:

Don't reuse SI when replacing it with new instruction, which causes self-reference of instruction. 
Please apply `Builder.CreateSelect(CondVal, SLTZero, One)` to create a new select instruction, instead of reuse SI by `replaceOperand(SI, 1, NewTrue);`..

https://github.com/llvm/llvm-project/pull/69961


More information about the llvm-commits mailing list