Skip to content

Commit 05f1e09

Browse files
Apply suggestions from code review
Co-authored-by: Nikita Popov <[email protected]>
1 parent 0658f3d commit 05f1e09

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

llvm/lib/Transforms/InstCombine/InstCombineCasts.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -815,8 +815,7 @@ Instruction *InstCombinerImpl::visitTrunc(TruncInst &Trunc) {
815815
return new ICmpInst(ICmpInst::ICMP_EQ, X, CmpC);
816816
}
817817

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)))) {
818+
if (match(Src, m_Shr(m_Value(X), m_SpecificInt(SrcWidth - 1)))) {
820819
// trunc (ashr X, BW-1) to i1 --> icmp slt X, 0
821820
// trunc (lshr X, BW-1) to i1 --> icmp slt X, 0
822821
return new ICmpInst(ICmpInst::ICMP_SLT, X, Zero);

0 commit comments

Comments
 (0)