Skip to content

Commit 76cd035

Browse files
committed
[InstCombine] Preserve exact instruction name for xor->or transform in SimplifyDemandedUseBits.
We were previously retaining the name with a numeric suffix.
1 parent 6b6552a commit 76cd035

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

llvm/lib/Transforms/InstCombine/InstCombineSimplifyDemanded.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -314,8 +314,8 @@ Value *InstCombinerImpl::SimplifyDemandedUseBits(Value *V, APInt DemandedMask,
314314
// e.g. (A & C1)^(B & C2) -> (A & C1)|(B & C2) iff C1&C2 == 0
315315
if (DemandedMask.isSubsetOf(RHSKnown.Zero | LHSKnown.Zero)) {
316316
Instruction *Or =
317-
BinaryOperator::CreateOr(I->getOperand(0), I->getOperand(1),
318-
I->getName());
317+
BinaryOperator::CreateOr(I->getOperand(0), I->getOperand(1));
318+
Or->takeName(I);
319319
return InsertNewInstWith(Or, I->getIterator());
320320
}
321321

0 commit comments

Comments
 (0)