[llvm] [llvm] Optimize usub.sat fix for #79690 (PR #151044)
Yingwei Zheng via llvm-commits
llvm-commits at lists.llvm.org
Sun Aug 24 04:56:33 PDT 2025
================
@@ -2009,6 +2086,9 @@ Instruction *InstCombinerImpl::foldSelectInstWithICmp(SelectInst &SI,
if (Instruction *NewSel =
tryToReuseConstantFromSelectInComparison(SI, *ICI, *this))
return NewSel;
+ if (Instruction *Folded =
+ foldICmpUSubSatWithAndForMostSignificantBitCmp(SI, ICI, Builder))
+ return replaceInstUsesWith(SI, Folded);
----------------
dtcxzyw wrote:
```suggestion
return Folded;
```
https://github.com/llvm/llvm-project/pull/151044
More information about the llvm-commits
mailing list