Skip to content

Commit 59ca3c2

Browse files
committed
Fix mistake
1 parent 0c43692 commit 59ca3c2

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

llvm/lib/Transforms/InstCombine/InstCombineShifts.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1270,8 +1270,8 @@ Instruction *InstCombinerImpl::visitLShr(BinaryOperator &I) {
12701270
// If both the add and the shift are nuw, then:
12711271
// ((X << Y) + Z) nuw >>u Z --> X + (Y nuw >>u Z) nuw
12721272
Value *Y;
1273-
if (match(Op0, m_OneUse(m_c_NUWAdd((m_NUWShl(m_Value(X), m_Specific(Op1))),
1274-
m_Value(Y))))) {
1273+
if (match(Op0, m_OneUse(m_c_NUWAdd(m_NUWShl(m_Value(X), m_Value(Y)),
1274+
m_Specific(Op1))))) {
12751275
Value *NewLshr = Builder.CreateLShr(Y, Op1, "", I.isExact());
12761276
auto *newAdd = BinaryOperator::CreateNUWAdd(NewLshr, X);
12771277
if (auto *Op0Bin = cast<OverflowingBinaryOperator>(Op0))

0 commit comments

Comments
 (0)