[llvm] [InstCombine] Fold A pred C ? (A >> BW - 1) : 1 --> ZExt(A pred C ? A < 0 : 1) (PR #69961)
via llvm-commits
llvm-commits at lists.llvm.org
Tue Feb 13 10:06:55 PST 2024
================
@@ -3409,6 +3409,25 @@ Instruction *InstCombinerImpl::visitSelectInst(SelectInst &SI) {
return replaceOperand(SI, 2, S);
}
+ {
+ // A pred C ? (A >> BW - 1) : 1 --> ZExt(A pred C ? A < 0 : 1)
----------------
elhewaty wrote:
@goldsteinn, Should I fold `A < 0` instead of `A Pred C`? or draft the patch until we can demonstrate that it benefits some real-world applications
https://github.com/llvm/llvm-project/pull/69961
More information about the llvm-commits
mailing list