aarch64: add missing F16 and F128 rules for scalar_size in ISLE - #14238
Conversation
b05b625 to
4572233
Compare
4572233 to
2018875
Compare
| @@ -0,0 +1,8 @@ | |||
| test compile | |||
There was a problem hiding this comment.
We usually have compile-tests with the precise-output flag to show (and lock down) the actual compilation output. Could you include that here? And could you add something for f128 as well if aarch64 has lowerings for it (I don't remember if it does)?
There was a problem hiding this comment.
Updated the f16 test to precise-output (emits fmadd h0, h0, h1, h2 as expected).
For f128: there are no native 128-bit float instructions on AArch64, so it would need softfloat libcalls (__addtf3, __fmatf3, etc.) which cranelift doesn't have on any backend yet, even x64 only handles f128const.For now I kept the scalar_size rule for F128 since it prevents a confusing panic, but happy to drop it if you'd prefer to keep this minimal.
There was a problem hiding this comment.
After checking further, keeping the F128 rule would be misleading,f128 arithmetic hits unexpected scalar FP operand size (size128)deeper in the backend anyway, so the scalar_size rule for it is effectively dead code. I've removed it and the corresponding model from prelude.isle, keeping only the F16 fix.
Add missing
F16andF128rules toscalar_sizeininst.isle, as well as their corresponding models inprelude.isle.Without these, rules that pass
f16orf128types toscalar_size(likefma.f16) trigger an ISLE panic becausescalar_sizeis a total term.