Skip to content

Commit 346cc9b

Browse files
committed
add first attempt at SelectionDAG.cpp for u/scmp
1 parent f0fe7b1 commit 346cc9b

File tree

1 file changed

+12
-6
lines changed

1 file changed

+12
-6
lines changed

llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6750,12 +6750,18 @@ SDValue SelectionDAG::getNode(unsigned Opcode, const SDLoc &DL, EVT VT,
67506750
if (VT.isVector() && VT.getVectorElementType() == MVT::i1)
67516751
return getNode(ISD::AND, DL, VT, N1, N2);
67526752
break;
6753-
case ISD::FADD:
6754-
case ISD::FSUB:
6755-
case ISD::FMUL:
6756-
case ISD::FDIV:
6757-
case ISD::FREM:
6758-
assert(VT.isFloatingPoint() && "This operator only applies to FP types!");
6753+
case ISD::UCMP:
6754+
case ISD::SCMP:
6755+
assert(VT.isInteger() && "This operator doe snot apply to FP types!");
6756+
assert(N1.getValueType() == N2.getValueType() &&
6757+
N1.getValueType() == VT && "Binary operator types must match");
6758+
break;
6759+
case ISD::FADD:
6760+
case ISD::FSUB:
6761+
case ISD::FMUL:
6762+
case ISD::FDIV:
6763+
case ISD::FREM:
6764+
assert(VT.isFloatingPoint() && "This operator only applies to FP types!");
67596765
assert(N1.getValueType() == N2.getValueType() &&
67606766
N1.getValueType() == VT && "Binary operator types must match!");
67616767
if (SDValue V = simplifyFPBinop(Opcode, N1, N2, Flags))

0 commit comments

Comments
 (0)