diff --git a/llvm/lib/Analysis/AssumptionCache.cpp b/llvm/lib/Analysis/AssumptionCache.cpp --- a/llvm/lib/Analysis/AssumptionCache.cpp +++ b/llvm/lib/Analysis/AssumptionCache.cpp @@ -115,13 +115,26 @@ AddAffectedFromEq(B); } - Value *X; - // Handle (A + C1) u< C2, which is the canonical form of A > C3 && A < C4, - // and recognized by LVI at least. - if (Pred == ICmpInst::ICMP_ULT && - match(A, m_Add(m_Value(X), m_ConstantInt())) && - match(B, m_ConstantInt())) - AddAffected(X); + else if (Pred == ICmpInst::ICMP_NE) { + Value *X, *Y; + // Handle (a & b != c). If a/b is a power of 2 we can use this + // information. + if (match(A, m_And(m_Value(X), m_Value(Y)))) { + AddAffected(X); + AddAffected(Y); + } + if (match(B, m_And(m_Value(X), m_Value(Y)))) { + AddAffected(X); + AddAffected(Y); + } + } else if (Pred == ICmpInst::ICMP_ULT) { + Value *X; + // Handle (A + C1) u< C2, which is the canonical form of A > C3 && A < C4, + // and recognized by LVI at least. + if (match(A, m_Add(m_Value(X), m_ConstantInt())) && + match(B, m_ConstantInt())) + AddAffected(X); + } } if (TTI) { diff --git a/llvm/lib/Analysis/ValueTracking.cpp b/llvm/lib/Analysis/ValueTracking.cpp --- a/llvm/lib/Analysis/ValueTracking.cpp +++ b/llvm/lib/Analysis/ValueTracking.cpp @@ -940,6 +940,27 @@ Known.Zero.setHighBits(RHSKnown.countMinLeadingZeros()); } break; + case ICmpInst::ICMP_NE: + // assume (v & b != a) + if (match(Cmp, m_c_ICmp(Pred, m_c_And(m_V, m_Value(B)), m_Value(A))) && + isValidAssumeForContext(I, Q.CxtI, Q.DT)) { + // We can figure out 1 bit in the following case: + // is_pow2(b) && 0 == a + // v.ones[log2(b)] = 1 + // Note the is_pow2(b) && b == a is cannonicalized to an ICMP_EQ case. + + + // Match OrZero so we catch the (X & -X) pattern + if (isKnownToBeAPowerOfTwo(B, true, Depth + 1, QueryNoAC) && + computeKnownBits(A, Depth + 1, QueryNoAC) + .anyextOrTrunc(BitWidth) + .isZero()) { + Known.One |= computeKnownBits(B, Depth + 1, QueryNoAC) + .anyextOrTrunc(BitWidth) + .One; + } + } + break; } } diff --git a/llvm/test/Transforms/InstCombine/icmp-binop.ll b/llvm/test/Transforms/InstCombine/icmp-binop.ll --- a/llvm/test/Transforms/InstCombine/icmp-binop.ll +++ b/llvm/test/Transforms/InstCombine/icmp-binop.ll @@ -51,9 +51,7 @@ ; CHECK-NEXT: [[AND:%.*]] = and i64 [[V:%.*]], 1 ; CHECK-NEXT: [[CMP:%.*]] = icmp ne i64 [[AND]], 0 ; CHECK-NEXT: tail call void @llvm.assume(i1 [[CMP]]) -; CHECK-NEXT: [[TOBOOL_NOT:%.*]] = icmp eq i64 [[V]], 0 -; CHECK-NEXT: [[CONV:%.*]] = zext i1 [[TOBOOL_NOT]] to i64 -; CHECK-NEXT: ret i64 [[CONV]] +; CHECK-NEXT: ret i64 0 ; entry: %and = and i64 %v, 1 @@ -71,10 +69,7 @@ ; CHECK-NEXT: [[AND:%.*]] = and i64 [[V:%.*]], 1 ; CHECK-NEXT: [[CMP:%.*]] = icmp ne i64 [[AND]], 0 ; CHECK-NEXT: tail call void @llvm.assume(i1 [[CMP]]) -; CHECK-NEXT: [[MUL_MASK:%.*]] = and i64 [[V]], 9223372036854775807 -; CHECK-NEXT: [[TOBOOL_NOT:%.*]] = icmp eq i64 [[MUL_MASK]], 0 -; CHECK-NEXT: [[CONV:%.*]] = zext i1 [[TOBOOL_NOT]] to i64 -; CHECK-NEXT: ret i64 [[CONV]] +; CHECK-NEXT: ret i64 0 ; entry: %and = and i64 %v, 1 @@ -133,8 +128,7 @@ ; CHECK-NEXT: [[AND:%.*]] = and i64 [[OTHER:%.*]], 1 ; CHECK-NEXT: [[CMP:%.*]] = icmp ne i64 [[AND]], 0 ; CHECK-NEXT: tail call void @llvm.assume(i1 [[CMP]]) -; CHECK-NEXT: [[MUL:%.*]] = mul i64 [[OTHER]], [[V:%.*]] -; CHECK-NEXT: [[TOBOOL_NOT:%.*]] = icmp eq i64 [[MUL]], 0 +; CHECK-NEXT: [[TOBOOL_NOT:%.*]] = icmp eq i64 [[V:%.*]], 0 ; CHECK-NEXT: [[CONV:%.*]] = zext i1 [[TOBOOL_NOT]] to i64 ; CHECK-NEXT: ret i64 [[CONV]] ; @@ -178,10 +172,7 @@ ; CHECK-NEXT: [[AND1:%.*]] = and i64 [[OTHER:%.*]], 1 ; CHECK-NEXT: [[CMP2:%.*]] = icmp ne i64 [[AND1]], 0 ; CHECK-NEXT: tail call void @llvm.assume(i1 [[CMP2]]) -; CHECK-NEXT: [[MUL:%.*]] = mul i64 [[OTHER]], [[V]] -; CHECK-NEXT: [[TOBOOL_NOT:%.*]] = icmp eq i64 [[MUL]], 0 -; CHECK-NEXT: [[CONV:%.*]] = zext i1 [[TOBOOL_NOT]] to i64 -; CHECK-NEXT: ret i64 [[CONV]] +; CHECK-NEXT: ret i64 0 ; entry: %and = and i64 %v, 1 @@ -205,8 +196,7 @@ ; CHECK-NEXT: [[AND1:%.*]] = and i64 [[OTHER:%.*]], 1 ; CHECK-NEXT: [[CMP2_NOT:%.*]] = icmp eq i64 [[AND1]], 0 ; CHECK-NEXT: tail call void @llvm.assume(i1 [[CMP2_NOT]]) -; CHECK-NEXT: [[MUL:%.*]] = mul i64 [[OTHER]], [[V]] -; CHECK-NEXT: [[TOBOOL_NOT:%.*]] = icmp eq i64 [[MUL]], 0 +; CHECK-NEXT: [[TOBOOL_NOT:%.*]] = icmp eq i64 [[OTHER]], 0 ; CHECK-NEXT: [[CONV:%.*]] = zext i1 [[TOBOOL_NOT]] to i64 ; CHECK-NEXT: ret i64 [[CONV]] ; @@ -361,8 +351,7 @@ ; CHECK-NEXT: [[AND:%.*]] = and i64 [[V:%.*]], 1 ; CHECK-NEXT: [[CMP:%.*]] = icmp ne i64 [[AND]], 0 ; CHECK-NEXT: tail call void @llvm.assume(i1 [[CMP]]) -; CHECK-NEXT: [[OR:%.*]] = or i64 [[V]], 1 -; CHECK-NEXT: ret i64 [[OR]] +; CHECK-NEXT: ret i64 [[V]] ; entry: %and = and i64 %v, 1 @@ -459,10 +448,7 @@ ; CHECK-NEXT: [[AND:%.*]] = and i64 [[OTHER:%.*]], 1 ; CHECK-NEXT: [[CMP:%.*]] = icmp ne i64 [[AND]], 0 ; CHECK-NEXT: tail call void @llvm.assume(i1 [[CMP]]) -; CHECK-NEXT: [[OR:%.*]] = or i64 [[OTHER]], [[V:%.*]] -; CHECK-NEXT: [[TOBOOL_NOT:%.*]] = icmp eq i64 [[OR]], 0 -; CHECK-NEXT: [[CONV:%.*]] = zext i1 [[TOBOOL_NOT]] to i64 -; CHECK-NEXT: ret i64 [[CONV]] +; CHECK-NEXT: ret i64 0 ; entry: %and = and i64 %other, 1 @@ -498,10 +484,7 @@ ; CHECK-NEXT: [[AND1:%.*]] = and i64 [[OTHER:%.*]], 1 ; CHECK-NEXT: [[CMP2:%.*]] = icmp ne i64 [[AND1]], 0 ; CHECK-NEXT: tail call void @llvm.assume(i1 [[CMP2]]) -; CHECK-NEXT: [[OR:%.*]] = or i64 [[OTHER]], [[V]] -; CHECK-NEXT: [[TOBOOL_NOT:%.*]] = icmp eq i64 [[OR]], 0 -; CHECK-NEXT: [[CONV:%.*]] = zext i1 [[TOBOOL_NOT]] to i64 -; CHECK-NEXT: ret i64 [[CONV]] +; CHECK-NEXT: ret i64 0 ; entry: %and = and i64 %v, 1 @@ -645,9 +628,7 @@ ; CHECK-NEXT: [[AND:%.*]] = and i64 [[V:%.*]], 1 ; CHECK-NEXT: [[CMP:%.*]] = icmp ne i64 [[AND]], 0 ; CHECK-NEXT: tail call void @llvm.assume(i1 [[CMP]]) -; CHECK-NEXT: [[TOBOOL_NOT:%.*]] = icmp eq i64 [[V]], 0 -; CHECK-NEXT: [[CONV:%.*]] = zext i1 [[TOBOOL_NOT]] to i64 -; CHECK-NEXT: ret i64 [[CONV]] +; CHECK-NEXT: ret i64 0 ; entry: %and = and i64 %v, 1 @@ -664,9 +645,7 @@ ; CHECK-NEXT: [[AND:%.*]] = and i64 [[V:%.*]], 1 ; CHECK-NEXT: [[CMP:%.*]] = icmp ne i64 [[AND]], 0 ; CHECK-NEXT: tail call void @llvm.assume(i1 [[CMP]]) -; CHECK-NEXT: [[TOBOOL_NOT:%.*]] = icmp eq i64 [[V]], 0 -; CHECK-NEXT: [[CONV:%.*]] = zext i1 [[TOBOOL_NOT]] to i64 -; CHECK-NEXT: ret i64 [[CONV]] +; CHECK-NEXT: ret i64 0 ; entry: %and = and i64 %v, 1 @@ -721,8 +700,7 @@ ; CHECK-NEXT: [[AND:%.*]] = and i64 [[OTHER:%.*]], 1 ; CHECK-NEXT: [[CMP:%.*]] = icmp ne i64 [[AND]], 0 ; CHECK-NEXT: tail call void @llvm.assume(i1 [[CMP]]) -; CHECK-NEXT: [[MUL:%.*]] = mul nsw i64 [[OTHER]], [[V:%.*]] -; CHECK-NEXT: [[TOBOOL_NOT:%.*]] = icmp eq i64 [[MUL]], 0 +; CHECK-NEXT: [[TOBOOL_NOT:%.*]] = icmp eq i64 [[V:%.*]], 0 ; CHECK-NEXT: [[CONV:%.*]] = zext i1 [[TOBOOL_NOT]] to i64 ; CHECK-NEXT: ret i64 [[CONV]] ; @@ -766,10 +744,7 @@ ; CHECK-NEXT: [[AND1:%.*]] = and i64 [[OTHER:%.*]], 1 ; CHECK-NEXT: [[CMP2:%.*]] = icmp ne i64 [[AND1]], 0 ; CHECK-NEXT: tail call void @llvm.assume(i1 [[CMP2]]) -; CHECK-NEXT: [[MUL:%.*]] = mul nsw i64 [[OTHER]], [[V]] -; CHECK-NEXT: [[TOBOOL_NOT:%.*]] = icmp eq i64 [[MUL]], 0 -; CHECK-NEXT: [[CONV:%.*]] = zext i1 [[TOBOOL_NOT]] to i64 -; CHECK-NEXT: ret i64 [[CONV]] +; CHECK-NEXT: ret i64 0 ; entry: %and = and i64 %v, 1 @@ -793,8 +768,7 @@ ; CHECK-NEXT: [[AND1:%.*]] = and i64 [[OTHER:%.*]], 1 ; CHECK-NEXT: [[CMP2_NOT:%.*]] = icmp eq i64 [[AND1]], 0 ; CHECK-NEXT: tail call void @llvm.assume(i1 [[CMP2_NOT]]) -; CHECK-NEXT: [[MUL:%.*]] = mul nsw i64 [[OTHER]], [[V]] -; CHECK-NEXT: [[TOBOOL_NOT:%.*]] = icmp eq i64 [[MUL]], 0 +; CHECK-NEXT: [[TOBOOL_NOT:%.*]] = icmp eq i64 [[OTHER]], 0 ; CHECK-NEXT: [[CONV:%.*]] = zext i1 [[TOBOOL_NOT]] to i64 ; CHECK-NEXT: ret i64 [[CONV]] ; @@ -988,10 +962,7 @@ ; CHECK-NEXT: [[AND:%.*]] = and i64 [[OTHER:%.*]], 1 ; CHECK-NEXT: [[CMP:%.*]] = icmp ne i64 [[AND]], 0 ; CHECK-NEXT: tail call void @llvm.assume(i1 [[CMP]]) -; CHECK-NEXT: [[OR:%.*]] = or i64 [[OTHER]], [[V:%.*]] -; CHECK-NEXT: [[TOBOOL_NOT:%.*]] = icmp eq i64 [[OR]], 0 -; CHECK-NEXT: [[CONV:%.*]] = zext i1 [[TOBOOL_NOT]] to i64 -; CHECK-NEXT: ret i64 [[CONV]] +; CHECK-NEXT: ret i64 0 ; entry: %and = and i64 %other, 1 @@ -1027,10 +998,7 @@ ; CHECK-NEXT: [[AND1:%.*]] = and i64 [[OTHER:%.*]], 1 ; CHECK-NEXT: [[CMP2:%.*]] = icmp ne i64 [[AND1]], 0 ; CHECK-NEXT: tail call void @llvm.assume(i1 [[CMP2]]) -; CHECK-NEXT: [[OR:%.*]] = or i64 [[OTHER]], [[V]] -; CHECK-NEXT: [[TOBOOL_NOT:%.*]] = icmp eq i64 [[OR]], 0 -; CHECK-NEXT: [[CONV:%.*]] = zext i1 [[TOBOOL_NOT]] to i64 -; CHECK-NEXT: ret i64 [[CONV]] +; CHECK-NEXT: ret i64 0 ; entry: %and = and i64 %v, 1 @@ -1240,16 +1208,14 @@ ; CHECK-NEXT: [[AND:%.*]] = and i32 [[V:%.*]], 1 ; CHECK-NEXT: [[CMP:%.*]] = icmp ne i32 [[AND]], 0 ; CHECK-NEXT: tail call void @llvm.assume(i1 [[CMP]]) -; CHECK-NEXT: [[TOBOOL_NOT:%.*]] = icmp eq i32 [[V]], 0 -; CHECK-NEXT: br i1 [[TOBOOL_NOT]], label [[IF_THEN1:%.*]], label [[IF_END2:%.*]] +; CHECK-NEXT: br i1 false, label [[IF_THEN1:%.*]], label [[IF_END2:%.*]] ; CHECK: if.then1: -; CHECK-NEXT: [[CALL:%.*]] = tail call i32 (...) @foo32() ; CHECK-NEXT: br label [[RETURN:%.*]] ; CHECK: if.end2: ; CHECK-NEXT: [[CALL3:%.*]] = tail call i32 (...) @bar32() ; CHECK-NEXT: br label [[RETURN]] ; CHECK: return: -; CHECK-NEXT: [[RETVAL_0:%.*]] = phi i32 [ [[CALL3]], [[IF_END2]] ], [ [[CALL]], [[IF_THEN1]] ] +; CHECK-NEXT: [[RETVAL_0:%.*]] = phi i32 [ [[CALL3]], [[IF_END2]] ], [ poison, [[IF_THEN1]] ] ; CHECK-NEXT: ret i32 [[RETVAL_0]] ; entry: @@ -1279,17 +1245,14 @@ ; CHECK-NEXT: [[AND:%.*]] = and i32 [[V:%.*]], 1 ; CHECK-NEXT: [[CMP:%.*]] = icmp ne i32 [[AND]], 0 ; CHECK-NEXT: tail call void @llvm.assume(i1 [[CMP]]) -; CHECK-NEXT: [[MUL_MASK:%.*]] = and i32 [[V]], 2147483647 -; CHECK-NEXT: [[TOBOOL_NOT:%.*]] = icmp eq i32 [[MUL_MASK]], 0 -; CHECK-NEXT: br i1 [[TOBOOL_NOT]], label [[IF_THEN1:%.*]], label [[IF_END2:%.*]] +; CHECK-NEXT: br i1 false, label [[IF_THEN1:%.*]], label [[IF_END2:%.*]] ; CHECK: if.then1: -; CHECK-NEXT: [[CALL:%.*]] = tail call i32 (...) @foo32() ; CHECK-NEXT: br label [[RETURN:%.*]] ; CHECK: if.end2: ; CHECK-NEXT: [[CALL3:%.*]] = tail call i32 (...) @bar32() ; CHECK-NEXT: br label [[RETURN]] ; CHECK: return: -; CHECK-NEXT: [[RETVAL_0:%.*]] = phi i32 [ [[CALL3]], [[IF_END2]] ], [ [[CALL]], [[IF_THEN1]] ] +; CHECK-NEXT: [[RETVAL_0:%.*]] = phi i32 [ [[CALL3]], [[IF_END2]] ], [ poison, [[IF_THEN1]] ] ; CHECK-NEXT: ret i32 [[RETVAL_0]] ; entry: @@ -1398,8 +1361,7 @@ ; CHECK-NEXT: [[AND:%.*]] = and i32 [[OTHER:%.*]], 1 ; CHECK-NEXT: [[CMP:%.*]] = icmp ne i32 [[AND]], 0 ; CHECK-NEXT: tail call void @llvm.assume(i1 [[CMP]]) -; CHECK-NEXT: [[MUL:%.*]] = mul i32 [[OTHER]], [[V:%.*]] -; CHECK-NEXT: [[TOBOOL_NOT:%.*]] = icmp eq i32 [[MUL]], 0 +; CHECK-NEXT: [[TOBOOL_NOT:%.*]] = icmp eq i32 [[V:%.*]], 0 ; CHECK-NEXT: br i1 [[TOBOOL_NOT]], label [[IF_THEN1:%.*]], label [[IF_END2:%.*]] ; CHECK: if.then1: ; CHECK-NEXT: [[CALL:%.*]] = tail call i32 (...) @foo32() @@ -1481,17 +1443,14 @@ ; CHECK-NEXT: [[AND1:%.*]] = and i32 [[OTHER:%.*]], 1 ; CHECK-NEXT: [[CMP2:%.*]] = icmp ne i32 [[AND1]], 0 ; CHECK-NEXT: tail call void @llvm.assume(i1 [[CMP2]]) -; CHECK-NEXT: [[MUL:%.*]] = mul i32 [[OTHER]], [[V]] -; CHECK-NEXT: [[TOBOOL_NOT:%.*]] = icmp eq i32 [[MUL]], 0 -; CHECK-NEXT: br i1 [[TOBOOL_NOT]], label [[IF_THEN5:%.*]], label [[IF_END6:%.*]] +; CHECK-NEXT: br i1 false, label [[IF_THEN5:%.*]], label [[IF_END6:%.*]] ; CHECK: if.then5: -; CHECK-NEXT: [[CALL:%.*]] = tail call i32 (...) @foo32() ; CHECK-NEXT: br label [[RETURN:%.*]] ; CHECK: if.end6: ; CHECK-NEXT: [[CALL7:%.*]] = tail call i32 (...) @bar32() ; CHECK-NEXT: br label [[RETURN]] ; CHECK: return: -; CHECK-NEXT: [[RETVAL_0:%.*]] = phi i32 [ [[CALL7]], [[IF_END6]] ], [ [[CALL]], [[IF_THEN5]] ] +; CHECK-NEXT: [[RETVAL_0:%.*]] = phi i32 [ [[CALL7]], [[IF_END6]] ], [ poison, [[IF_THEN5]] ] ; CHECK-NEXT: ret i32 [[RETVAL_0]] ; entry: @@ -1527,8 +1486,7 @@ ; CHECK-NEXT: [[AND1:%.*]] = and i32 [[OTHER:%.*]], 1 ; CHECK-NEXT: [[CMP2_NOT:%.*]] = icmp eq i32 [[AND1]], 0 ; CHECK-NEXT: tail call void @llvm.assume(i1 [[CMP2_NOT]]) -; CHECK-NEXT: [[MUL:%.*]] = mul i32 [[OTHER]], [[V]] -; CHECK-NEXT: [[TOBOOL_NOT:%.*]] = icmp eq i32 [[MUL]], 0 +; CHECK-NEXT: [[TOBOOL_NOT:%.*]] = icmp eq i32 [[OTHER]], 0 ; CHECK-NEXT: br i1 [[TOBOOL_NOT]], label [[IF_THEN5:%.*]], label [[IF_END6:%.*]] ; CHECK: if.then5: ; CHECK-NEXT: [[CALL:%.*]] = tail call i32 (...) @foo32() @@ -1771,8 +1729,7 @@ ; CHECK-NEXT: [[AND:%.*]] = and i32 [[V:%.*]], 1 ; CHECK-NEXT: [[CMP:%.*]] = icmp ne i32 [[AND]], 0 ; CHECK-NEXT: tail call void @llvm.assume(i1 [[CMP]]) -; CHECK-NEXT: [[OR:%.*]] = or i32 [[V]], 1 -; CHECK-NEXT: ret i32 [[OR]] +; CHECK-NEXT: ret i32 [[V]] ; entry: %and = and i32 %v, 1 @@ -1869,17 +1826,14 @@ ; CHECK-NEXT: [[AND:%.*]] = and i32 [[OTHER:%.*]], 1 ; CHECK-NEXT: [[CMP:%.*]] = icmp ne i32 [[AND]], 0 ; CHECK-NEXT: tail call void @llvm.assume(i1 [[CMP]]) -; CHECK-NEXT: [[OR:%.*]] = or i32 [[OTHER]], [[V:%.*]] -; CHECK-NEXT: [[TOBOOL_NOT:%.*]] = icmp eq i32 [[OR]], 0 -; CHECK-NEXT: br i1 [[TOBOOL_NOT]], label [[IF_THEN1:%.*]], label [[IF_END2:%.*]] +; CHECK-NEXT: br i1 false, label [[IF_THEN1:%.*]], label [[IF_END2:%.*]] ; CHECK: if.then1: -; CHECK-NEXT: [[CALL:%.*]] = tail call i32 (...) @foo32() ; CHECK-NEXT: br label [[RETURN:%.*]] ; CHECK: if.end2: ; CHECK-NEXT: [[CALL3:%.*]] = tail call i32 (...) @bar32() ; CHECK-NEXT: br label [[RETURN]] ; CHECK: return: -; CHECK-NEXT: [[RETVAL_0:%.*]] = phi i32 [ [[CALL3]], [[IF_END2]] ], [ [[CALL]], [[IF_THEN1]] ] +; CHECK-NEXT: [[RETVAL_0:%.*]] = phi i32 [ [[CALL3]], [[IF_END2]] ], [ poison, [[IF_THEN1]] ] ; CHECK-NEXT: ret i32 [[RETVAL_0]] ; entry: @@ -1929,17 +1883,14 @@ ; CHECK-NEXT: [[AND1:%.*]] = and i32 [[OTHER:%.*]], 1 ; CHECK-NEXT: [[CMP2:%.*]] = icmp ne i32 [[AND1]], 0 ; CHECK-NEXT: tail call void @llvm.assume(i1 [[CMP2]]) -; CHECK-NEXT: [[OR:%.*]] = or i32 [[OTHER]], [[V]] -; CHECK-NEXT: [[TOBOOL_NOT:%.*]] = icmp eq i32 [[OR]], 0 -; CHECK-NEXT: br i1 [[TOBOOL_NOT]], label [[IF_THEN5:%.*]], label [[IF_END6:%.*]] +; CHECK-NEXT: br i1 false, label [[IF_THEN5:%.*]], label [[IF_END6:%.*]] ; CHECK: if.then5: -; CHECK-NEXT: [[CALL:%.*]] = tail call i32 (...) @foo32() ; CHECK-NEXT: br label [[RETURN:%.*]] ; CHECK: if.end6: ; CHECK-NEXT: [[CALL7:%.*]] = tail call i32 (...) @bar32() ; CHECK-NEXT: br label [[RETURN]] ; CHECK: return: -; CHECK-NEXT: [[RETVAL_0:%.*]] = phi i32 [ [[CALL7]], [[IF_END6]] ], [ [[CALL]], [[IF_THEN5]] ] +; CHECK-NEXT: [[RETVAL_0:%.*]] = phi i32 [ [[CALL7]], [[IF_END6]] ], [ poison, [[IF_THEN5]] ] ; CHECK-NEXT: ret i32 [[RETVAL_0]] ; entry: