Skip to content

Commit

Permalink
Fix -Wself-assign from r289955
Browse files Browse the repository at this point in the history
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@289962 91177308-0d34-0410-b5e6-96231b3b80d8
zmodem committed Dec 16, 2016
1 parent c091dee commit 17bc73a
Showing 1 changed file with 8 additions and 7 deletions.
15 changes: 8 additions & 7 deletions lib/Target/X86/X86ISelLowering.cpp
Original file line number Diff line number Diff line change
@@ -28937,18 +28937,19 @@ static SDValue combineSetCCAtomicArith(SDValue Cmp, X86::CondCode &CC,
if (Opc == ISD::ATOMIC_LOAD_SUB)
Addend = -Addend;

if (Comparand == -Addend)
CC = CC; // No change.
else if (CC == X86::COND_S && Comparand == 0 && Addend == 1)
if (Comparand == -Addend) {
// No change to CC.
} else if (CC == X86::COND_S && Comparand == 0 && Addend == 1) {
CC = X86::COND_LE;
else if (CC == X86::COND_NS && Comparand == 0 && Addend == 1)
} else if (CC == X86::COND_NS && Comparand == 0 && Addend == 1) {
CC = X86::COND_G;
else if (CC == X86::COND_G && Comparand == 0 && Addend == -1)
} else if (CC == X86::COND_G && Comparand == 0 && Addend == -1) {
CC = X86::COND_GE;
else if (CC == X86::COND_LE && Comparand == 0 && Addend == -1)
} else if (CC == X86::COND_LE && Comparand == 0 && Addend == -1) {
CC = X86::COND_L;
else
} else {
return SDValue();
}

SDValue LockOp = lowerAtomicArithWithLOCK(CmpLHS, DAG);
DAG.ReplaceAllUsesOfValueWith(CmpLHS.getValue(0),

0 comments on commit 17bc73a

Please sign in to comment.