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

Sergei Barannikov via llvm-commits llvm-commits at lists.llvm.org
Mon Dec 16 05:21:56 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());
----------------
s-barannikov wrote:

I don't think it will make much of a difference, there are only four uses for now.
This is the same as querying InstrInfo / RegisterInfo: we could introduce wrappers for those, but they are so rarely used that no one cares.


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


More information about the llvm-commits mailing list