Skip to content

Commit db859db

Browse files
committed
Revert "CodeGen: Add ISD::AssertNoFPClass (llvm#135946)"
This reverts commit f0c61d2.
1 parent 53a8b89 commit db859db

File tree

10 files changed

+3
-456
lines changed

10 files changed

+3
-456
lines changed

llvm/include/llvm/CodeGen/ISDOpcodes.h

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -67,15 +67,6 @@ enum NodeType {
6767
/// poisoned the assertion will not be true for that value.
6868
AssertAlign,
6969

70-
/// AssertNoFPClass - These nodes record if a register contains a float
71-
/// value that is known to be not some type.
72-
/// This node takes two operands. The first is the node that is known
73-
/// never to be some float types; the second is a constant value with
74-
/// the value of FPClassTest (casted to uint32_t).
75-
/// NOTE: In case of the source value (or any vector element value) is
76-
/// poisoned the assertion will not be true for that value.
77-
AssertNoFPClass,
78-
7970
/// Various leaf nodes.
8071
BasicBlock,
8172
VALUETYPE,

llvm/include/llvm/Target/TargetSelectionDAG.td

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -871,7 +871,6 @@ def SDT_assert : SDTypeProfile<1, 1,
871871
[SDTCisInt<0>, SDTCisInt<1>, SDTCisSameAs<1, 0>]>;
872872
def assertsext : SDNode<"ISD::AssertSext", SDT_assert>;
873873
def assertzext : SDNode<"ISD::AssertZext", SDT_assert>;
874-
def assertnofpclass : SDNode<"ISD::AssertNoFPClass", SDTFPUnaryOp>;
875874
def assertalign : SDNode<"ISD::AssertAlign", SDT_assert>;
876875

877876
def convergencectrl_anchor : SDNode<"ISD::CONVERGENCECTRL_ANCHOR",

llvm/lib/CodeGen/SelectionDAG/LegalizeFloatTypes.cpp

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,6 @@ void DAGTypeLegalizer::SoftenFloatResult(SDNode *N, unsigned ResNo) {
168168
case ISD::POISON:
169169
case ISD::UNDEF: R = SoftenFloatRes_UNDEF(N); break;
170170
case ISD::VAARG: R = SoftenFloatRes_VAARG(N); break;
171-
case ISD::AssertNoFPClass: R = GetSoftenedFloat(N->getOperand(0)); break;
172171
case ISD::VECREDUCE_FADD:
173172
case ISD::VECREDUCE_FMUL:
174173
case ISD::VECREDUCE_FMIN:
@@ -2577,7 +2576,6 @@ bool DAGTypeLegalizer::PromoteFloatOperand(SDNode *N, unsigned OpNo) {
25772576
R = PromoteFloatOp_FAKE_USE(N, OpNo);
25782577
break;
25792578
case ISD::FCOPYSIGN: R = PromoteFloatOp_FCOPYSIGN(N, OpNo); break;
2580-
case ISD::AssertNoFPClass:
25812579
case ISD::FP_TO_SINT:
25822580
case ISD::FP_TO_UINT:
25832581
case ISD::LROUND:
@@ -2805,7 +2803,6 @@ void DAGTypeLegalizer::PromoteFloatResult(SDNode *N, unsigned ResNo) {
28052803
case ISD::FTRUNC:
28062804
case ISD::FTAN:
28072805
case ISD::FTANH:
2808-
case ISD::AssertNoFPClass:
28092806
case ISD::FCANONICALIZE: R = PromoteFloatRes_UnaryOp(N); break;
28102807

28112808
// Binary FP Operations

llvm/lib/CodeGen/SelectionDAG/LegalizeVectorTypes.cpp

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,6 @@ void DAGTypeLegalizer::ScalarizeVectorResult(SDNode *N, unsigned ResNo) {
129129
case ISD::UINT_TO_FP:
130130
case ISD::ZERO_EXTEND:
131131
case ISD::FCANONICALIZE:
132-
case ISD::AssertNoFPClass:
133132
R = ScalarizeVecRes_UnaryOp(N);
134133
break;
135134
case ISD::ADDRSPACECAST:
@@ -1277,7 +1276,6 @@ void DAGTypeLegalizer::SplitVectorResult(SDNode *N, unsigned ResNo) {
12771276
case ISD::UINT_TO_FP:
12781277
case ISD::VP_UINT_TO_FP:
12791278
case ISD::FCANONICALIZE:
1280-
case ISD::AssertNoFPClass:
12811279
SplitVecRes_UnaryOp(N, Lo, Hi);
12821280
break;
12831281
case ISD::ADDRSPACECAST:
@@ -4846,7 +4844,6 @@ void DAGTypeLegalizer::WidenVectorResult(SDNode *N, unsigned ResNo) {
48464844
case ISD::FREEZE:
48474845
case ISD::ARITH_FENCE:
48484846
case ISD::FCANONICALIZE:
4849-
case ISD::AssertNoFPClass:
48504847
Res = WidenVecRes_Unary(N);
48514848
break;
48524849
case ISD::FMA: case ISD::VP_FMA:

llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -5832,15 +5832,6 @@ bool SelectionDAG::isKnownNeverNaN(SDValue Op, const APInt &DemandedElts,
58325832
return false;
58335833
return true;
58345834
}
5835-
case ISD::AssertNoFPClass: {
5836-
FPClassTest NoFPClass =
5837-
static_cast<FPClassTest>(Op.getConstantOperandVal(1));
5838-
if ((NoFPClass & fcNan) == fcNan)
5839-
return true;
5840-
if (SNaN && (NoFPClass & fcSNan) == fcSNan)
5841-
return true;
5842-
return isKnownNeverNaN(Op.getOperand(0), DemandedElts, SNaN, Depth + 1);
5843-
}
58445835
default:
58455836
if (Opcode >= ISD::BUILTIN_OP_END || Opcode == ISD::INTRINSIC_WO_CHAIN ||
58465837
Opcode == ISD::INTRINSIC_W_CHAIN || Opcode == ISD::INTRINSIC_VOID) {
@@ -7495,17 +7486,6 @@ SDValue SelectionDAG::getNode(unsigned Opcode, const SDLoc &DL, EVT VT,
74957486
N2.getOpcode() == ISD::TargetConstant && "Invalid FP_ROUND!");
74967487
if (N1.getValueType() == VT) return N1; // noop conversion.
74977488
break;
7498-
case ISD::AssertNoFPClass: {
7499-
assert(N1.getValueType().isFloatingPoint() &&
7500-
"AssertNoFPClass is used for a non-floating type");
7501-
assert(isa<ConstantSDNode>(N2) && "NoFPClass is not Constant");
7502-
[[maybe_unused]] FPClassTest NoFPClass =
7503-
static_cast<FPClassTest>(N2->getAsZExtVal());
7504-
assert(llvm::to_underlying(NoFPClass) <=
7505-
BitmaskEnumDetail::Mask<FPClassTest>() &&
7506-
"FPClassTest value too large");
7507-
break;
7508-
}
75097489
case ISD::AssertSext:
75107490
case ISD::AssertZext: {
75117491
EVT EVT = cast<VTSDNode>(N2)->getVT();

llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp

Lines changed: 3 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -11829,18 +11829,9 @@ void SelectionDAGISel::LowerArguments(const Function &F) {
1182911829
else if (Arg.hasAttribute(Attribute::ZExt))
1183011830
AssertOp = ISD::AssertZext;
1183111831

11832-
SDValue OutVal =
11833-
getCopyFromParts(DAG, dl, &InVals[i], NumParts, PartVT, VT, nullptr,
11834-
NewRoot, F.getCallingConv(), AssertOp);
11835-
11836-
FPClassTest NoFPClass = Arg.getNoFPClass();
11837-
if (NoFPClass != fcNone) {
11838-
SDValue SDNoFPClass = DAG.getTargetConstant(
11839-
static_cast<uint64_t>(NoFPClass), dl, MVT::i32);
11840-
OutVal = DAG.getNode(ISD::AssertNoFPClass, dl, OutVal.getValueType(),
11841-
OutVal, SDNoFPClass);
11842-
}
11843-
ArgValues.push_back(OutVal);
11832+
ArgValues.push_back(getCopyFromParts(DAG, dl, &InVals[i], NumParts,
11833+
PartVT, VT, nullptr, NewRoot,
11834+
F.getCallingConv(), AssertOp));
1184411835
}
1184511836

1184611837
i += NumParts;

llvm/lib/CodeGen/SelectionDAG/SelectionDAGDumper.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,6 @@ std::string SDNode::getOperationName(const SelectionDAG *G) const {
122122
case ISD::TokenFactor: return "TokenFactor";
123123
case ISD::AssertSext: return "AssertSext";
124124
case ISD::AssertZext: return "AssertZext";
125-
case ISD::AssertNoFPClass: return "AssertNoFPClass";
126125
case ISD::AssertAlign: return "AssertAlign";
127126

128127
case ISD::BasicBlock: return "BasicBlock";

llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3264,7 +3264,6 @@ void SelectionDAGISel::SelectCodeCommon(SDNode *NodeToMatch,
32643264
return;
32653265
case ISD::AssertSext:
32663266
case ISD::AssertZext:
3267-
case ISD::AssertNoFPClass:
32683267
case ISD::AssertAlign:
32693268
ReplaceUses(SDValue(NodeToMatch, 0), NodeToMatch->getOperand(0));
32703269
CurDAG->RemoveDeadNode(NodeToMatch);

llvm/test/CodeGen/AArch64/nofpclass.ll

Lines changed: 0 additions & 182 deletions
This file was deleted.

0 commit comments

Comments
 (0)