Skip to content

Commit 7886ae3

Browse files
authored
[SelectionDAG] Add stricter SDTypeProfile for strict_fsetcc(s). (#162724)
We can say the operand type is FP.
1 parent 74858f3 commit 7886ae3

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

llvm/include/llvm/Target/TargetSelectionDAG.td

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -205,6 +205,10 @@ def SDTSetCC : SDTypeProfile<1, 3, [ // setcc
205205
SDTCisInt<0>, SDTCisSameAs<1, 2>, SDTCisVT<3, OtherVT>
206206
]>;
207207

208+
def SDTFSetCC : SDTypeProfile<1, 3, [ // strict_fsetcc, strict_fsetccs
209+
SDTCisInt<0>, SDTCisFP<1>, SDTCisSameAs<1, 2>, SDTCisVT<3, OtherVT>
210+
]>;
211+
208212
def SDTSelect : SDTypeProfile<1, 3, [ // select
209213
SDTCisInt<1>, SDTCisSameAs<0, 2>, SDTCisSameAs<2, 3>
210214
]>;
@@ -699,8 +703,8 @@ def strict_bf16_to_fp : SDNode<"ISD::STRICT_BF16_TO_FP",
699703
def strict_fp_to_bf16 : SDNode<"ISD::STRICT_FP_TO_BF16",
700704
SDTFPToIntOp, [SDNPHasChain]>;
701705

702-
def strict_fsetcc : SDNode<"ISD::STRICT_FSETCC", SDTSetCC, [SDNPHasChain]>;
703-
def strict_fsetccs : SDNode<"ISD::STRICT_FSETCCS", SDTSetCC, [SDNPHasChain]>;
706+
def strict_fsetcc : SDNode<"ISD::STRICT_FSETCC", SDTFSetCC, [SDNPHasChain]>;
707+
def strict_fsetccs : SDNode<"ISD::STRICT_FSETCCS", SDTFSetCC, [SDNPHasChain]>;
704708

705709
def get_fpenv : SDNode<"ISD::GET_FPENV", SDTGetFPStateOp, [SDNPHasChain]>;
706710
def set_fpenv : SDNode<"ISD::SET_FPENV", SDTSetFPStateOp, [SDNPHasChain]>;

0 commit comments

Comments
 (0)