We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 0658f3d commit 05f1e09Copy full SHA for 05f1e09
llvm/lib/Transforms/InstCombine/InstCombineCasts.cpp
@@ -815,8 +815,7 @@ Instruction *InstCombinerImpl::visitTrunc(TruncInst &Trunc) {
815
return new ICmpInst(ICmpInst::ICMP_EQ, X, CmpC);
816
}
817
818
- if (match(Src, m_AShr(m_Value(X), m_SpecificInt(SrcWidth - 1))) ||
819
- match(Src, m_LShr(m_Value(X), m_SpecificInt(SrcWidth - 1)))) {
+ if (match(Src, m_Shr(m_Value(X), m_SpecificInt(SrcWidth - 1)))) {
820
// trunc (ashr X, BW-1) to i1 --> icmp slt X, 0
821
// trunc (lshr X, BW-1) to i1 --> icmp slt X, 0
822
return new ICmpInst(ICmpInst::ICMP_SLT, X, Zero);
0 commit comments