Given the following situation:
x = G_FCONSTANT (something that can't be materialized) G_STORE x, some_addr
We know that x must be materialized as at least a single mov. However, at the time of selection, the G_STORE will have been regbankselected to a FPR store.
So, as a result, you'll get an unnecessary fmov into the G_STORE.
Storing a constant value in a GPR and a constant value in a FPR are the same. So, whenever you see a G_FCONSTANT that feeds into only G_STORES, so might as well make it a G_CONSTANT.
This adds a target-specific combine which changes G_FCONSTANTs feeding into G_STOREs into G_CONSTANTs.
There's no reason to go through getZExtValue, buildConstant accepts the APInt directly