[llvm] [InstCombine] Combine trunc (lshr X, BW-1) to i1 --> icmp slt X, 0 (#142593) (PR #143846)

Yingwei Zheng via llvm-commits llvm-commits at lists.llvm.org
Fri Jun 13 06:06:34 PDT 2025


================
@@ -823,6 +830,7 @@ Instruction *InstCombinerImpl::visitTrunc(TruncInst &Trunc) {
       Value *And = Builder.CreateAnd(X, MaskC);
       return new ICmpInst(ICmpInst::ICMP_NE, And, Zero);
     }
+
----------------
dtcxzyw wrote:

Remove the unnecessary newline.


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


More information about the llvm-commits mailing list