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 fea0bde commit 305c6c8Copy full SHA for 305c6c8
llvm/lib/Transforms/InstCombine/InstCombineMulDivRem.cpp
@@ -534,7 +534,7 @@ Instruction *InstCombinerImpl::visitMul(BinaryOperator &I) {
534
Shl->setHasNoUnsignedWrap(HasNUW);
535
return Shl;
536
}
537
- if (Value *Res = tryGetLog2(Op0, /*AssumeNonZero=*/false)) {
+ if (Value *Res = tryGetLog2(Op1, /*AssumeNonZero=*/false)) {
538
BinaryOperator *Shl = BinaryOperator::CreateShl(Op0, Res);
539
// We can only propegate nuw flag.
540
0 commit comments