If you want to materialize a floating-point constant using an
integer-to-floating-point conversion, I would suggest using a
target-specific node rather than a target-independent one.
Thanks Eli. The objective is to customise the type legalisation phase of SelectionDAG for a few nodes. Instead of converting directly between floating point and integer (which generates a library call) I’d like to lower via an intermediate sized integer which there is some hardware support for. This is partly motivated by the relevant library call not existing yet.
The only customisation hook I have found for type legalisation in the SelectionDAG is the target override performDAGCombine. I’d be very interested in an alternative mechanism for influencing type legalisation from within target specific code.