[llvm] [InstCombine] Remove the canonicalization of `trunc` to `i1` (PR #84628)

via llvm-commits llvm-commits at lists.llvm.org
Sun Mar 10 12:39:14 PDT 2024


================
@@ -763,6 +768,11 @@ Instruction *InstCombinerImpl::visitTrunc(TruncInst &Trunc) {
       Value *And = Builder.CreateAnd(X, Builder.CreateOr(MaskC, One));
       return new ICmpInst(ICmpInst::ICMP_NE, And, Zero);
     }
+    if (match(Src, m_Shl(m_SpecificInt(1), m_Value(X)))) {
----------------
goldsteinn wrote:

This could be any odd value.

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


More information about the llvm-commits mailing list