[PATCH] D28195: [selectiondag] Mark node created in SoftenFloatRes_FP_EXTEND as Processed.

Hal Finkel via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Jan 30 18:17:35 PST 2017


hfinkel added inline comments.


================
Comment at: lib/CodeGen/SelectionDAG/LegalizeFloatTypes.cpp:463
       SoftenFloatResult(Op.getNode(), 0);
+      Op.getNode()->setNodeId(Processed);
+    }
----------------
To some extent, this makes sense. The caller of SoftenFloatResult, DAGTypeLegalizer::run, is also what sets the node ID to `Processed`.

I wonder if there's a better design here, because I share your uncertainty about all of the relevant legalities being satisfied. It seems like what we're doing is taking

  FP_EXTEND f16 x -> fn

and rewriting them as:

  FP_EXTEND (FP_EXTEND f16 x -> f32) -> fn

where we're trying to directly recurse on that inner operation. I don't understand why we're trying to do that as opposed to just queueing the new node for processing. Would it work to just do:

  Worklist.push_back(Op.getNode());

instead of calling SoftenFloatResult?


https://reviews.llvm.org/D28195





More information about the llvm-commits mailing list