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 6c85e92 commit 9063022Copy full SHA for 9063022
llvm/lib/Transforms/InstCombine/InstCombineAndOrXor.cpp
@@ -2742,10 +2742,11 @@ Instruction *InstCombiner::visitOr(BinaryOperator &I) {
2742
Pred == CmpInst::ICMP_NE) {
2743
Value *A, *B;
2744
if (match(UMulWithOv, m_Intrinsic<Intrinsic::umul_with_overflow>(
2745
- m_Value(A), m_Value(B))))
2746
-
2747
- return BinaryOperator::CreateAnd(Builder.CreateIsNotNull(A),
2748
- Builder.CreateIsNotNull(B));
+ m_Value(A), m_Value(B)))) {
+ Value *NotNullA = Builder.CreateIsNotNull(A);
+ Value *NotNullB = Builder.CreateIsNotNull(B);
+ return BinaryOperator::CreateAnd(NotNullA, NotNullB);
2749
+ }
2750
}
2751
2752
return nullptr;
0 commit comments