Skip to content

Commit 83b42c3

Browse files
committed
[InstCombine] Address review comments. NFC.
1 parent fa0dcb6 commit 83b42c3

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

llvm/lib/Transforms/InstCombine/InstCombineCalls.cpp

+3-1
Original file line numberDiff line numberDiff line change
@@ -851,10 +851,12 @@ InstCombinerImpl::foldIntrinsicWithOverflowCommon(IntrinsicInst *II) {
851851
CallInst *I = cast<CallInst>(AssumeVH);
852852
if (!match(I->getArgOperand(0), m_Not(m_Specific(U))))
853853
continue;
854-
if (!isValidAssumeForContext(I, II, &DT))
854+
if (!isValidAssumeForContext(I, II, /*DT=*/nullptr,
855+
/*AllowEphemerals=*/true))
855856
continue;
856857
Value *Result =
857858
Builder.CreateBinOp(WO->getBinaryOp(), WO->getLHS(), WO->getRHS());
859+
Result->takeName(WO);
858860
if (auto *Inst = dyn_cast<Instruction>(Result)) {
859861
if (WO->isSigned())
860862
Inst->setHasNoSignedWrap();

0 commit comments

Comments
 (0)