Skip to content

Commit 69c1f27

Browse files
Update InstCombineShifts.cpp
1 parent d781ac1 commit 69c1f27

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

llvm/lib/Transforms/InstCombine/InstCombineShifts.cpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -994,6 +994,11 @@ static bool setShiftFlags(BinaryOperator &I, const SimplifyQuery &Q) {
994994
I.setIsExact();
995995
return true;
996996
}
997+
// shr X, cttz(X)
998+
if (match(I.getOperand(1), m_Intrinsic<Intrinsic::cttz>(m_Specific(I.getOperand(0))))) {
999+
I.setIsExact();
1000+
return true;
1001+
}
9971002
}
9981003

9991004
// Compute what we know about shift count.

0 commit comments

Comments
 (0)