mirror of
https://github.com/RPCS3/llvm.git
synced 2025-04-01 21:03:54 +00:00
Fix suspicous hasOneUse() check, found by PVS Studio (PR12357).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@157592 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
37fa1c81ac
commit
7bb9f063be
@ -2217,7 +2217,7 @@ Instruction *InstCombiner::visitXor(BinaryOperator &I) {
|
||||
if (Op0I && Op1I && Op0I->isShift() &&
|
||||
Op0I->getOpcode() == Op1I->getOpcode() &&
|
||||
Op0I->getOperand(1) == Op1I->getOperand(1) &&
|
||||
(Op1I->hasOneUse() || Op1I->hasOneUse())) {
|
||||
(Op0I->hasOneUse() || Op1I->hasOneUse())) {
|
||||
Value *NewOp =
|
||||
Builder->CreateXor(Op0I->getOperand(0), Op1I->getOperand(0),
|
||||
Op0I->getName());
|
||||
|
Loading…
x
Reference in New Issue
Block a user