[llvm] [SelectionDAG] Virtualize isTargetStrictFPOpcode / isTargetMemoryOpcode (PR #119969)

Simon Pilgrim via llvm-commits llvm-commits at lists.llvm.org
Mon Dec 16 04:58:10 PST 2024


================
@@ -54494,7 +54494,8 @@ static SDValue combineX86INT_TO_FP(SDNode *N, SelectionDAG &DAG,
 
 static SDValue combineCVTP2I_CVTTP2I(SDNode *N, SelectionDAG &DAG,
                                      TargetLowering::DAGCombinerInfo &DCI) {
-  bool IsStrict = N->isTargetStrictFPOpcode();
+  const SelectionDAGTargetInfo &TSI = DAG.getSelectionDAGInfo();
+  bool IsStrict = TSI.isTargetStrictFPOpcode(N->getOpcode());
----------------
RKSimon wrote:

Worth adding a SelectionDAG::isTargetStrictFPOpcode helper wrapper to remove all the getSelectionDAGInfo calls in target code?

https://github.com/llvm/llvm-project/pull/119969


More information about the llvm-commits mailing list