Unexpected dag combine in arm64

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.

“setOperationAction(ISD::UINT_TO_FP , MVT::i32 , Promote);” to automatically use a larger integer type. Or “setOperationAction(ISD::UINT_TO_FP , MVT::i32 , Custom);”, then write your custom code in LowerOperation. If you want examples, x86 uses both of these. -Eli