Skip to content

Commit ff8e0c3

Browse files
committed
[InstCombine] Explicitly set disjoint flag when converting xor to or.
1 parent 3c5b42a commit ff8e0c3

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

llvm/lib/Transforms/InstCombine/InstCombineSimplifyDemanded.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -315,6 +315,7 @@ Value *InstCombinerImpl::SimplifyDemandedUseBits(Value *V, APInt DemandedMask,
315315
if (DemandedMask.isSubsetOf(RHSKnown.Zero | LHSKnown.Zero)) {
316316
Instruction *Or =
317317
BinaryOperator::CreateOr(I->getOperand(0), I->getOperand(1));
318+
cast<PossiblyDisjointInst>(Or)->setIsDisjoint(true);
318319
Or->takeName(I);
319320
return InsertNewInstWith(Or, I->getIterator());
320321
}

0 commit comments

Comments
 (0)