Skip to content

Commit 125a552

Browse files
committed
address comments
1 parent cb32cff commit 125a552

File tree

2 files changed

+3
-12
lines changed

2 files changed

+3
-12
lines changed

llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18753,7 +18753,9 @@ SDValue DAGCombiner::rebuildSetCC(SDValue N) {
1875318753
EVT SetCCVT = N.getValueType();
1875418754
if (LegalTypes)
1875518755
SetCCVT = getSetCCResultType(SetCCVT);
18756-
// Replace the uses of XOR with SETCC
18756+
// Replace the uses of XOR with SETCC. Note, avoid this transformation if
18757+
// it would introduce illegal operations post-legalization as this can
18758+
// result in an infinite loop.
1875718759
const ISD::CondCode CC = Equal ? ISD::SETEQ : ISD::SETNE;
1875818760
if (!LegalOperations || TLI.isCondCodeLegal(CC, Op0.getSimpleValueType()))
1875918761
return DAG.getSetCC(SDLoc(N), SetCCVT, Op0, Op1, CC);

llvm/lib/Target/NVPTX/NVPTXInstrInfo.td

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -2120,17 +2120,6 @@ defm : ISET_FORMAT_UNSIGNED<setule, CmpLE>;
21202120
defm : ISET_FORMAT_UNSIGNED<setueq, CmpEQ>;
21212121
defm : ISET_FORMAT_UNSIGNED<setune, CmpNE>;
21222122

2123-
// i1 compares
2124-
def : Pat<(setne Int1Regs:$a, Int1Regs:$b),
2125-
(XORb1rr Int1Regs:$a, Int1Regs:$b)>;
2126-
def : Pat<(setune Int1Regs:$a, Int1Regs:$b),
2127-
(XORb1rr Int1Regs:$a, Int1Regs:$b)>;
2128-
2129-
def : Pat<(seteq Int1Regs:$a, Int1Regs:$b),
2130-
(NOT1 (XORb1rr Int1Regs:$a, Int1Regs:$b))>;
2131-
def : Pat<(setueq Int1Regs:$a, Int1Regs:$b),
2132-
(NOT1 (XORb1rr Int1Regs:$a, Int1Regs:$b))>;
2133-
21342123
// comparisons of i8 extracted with BFE as i32
21352124
// It's faster to do comparison directly on i32 extracted by BFE,
21362125
// instead of the long conversion and sign extending.

0 commit comments

Comments
 (0)