| ▲ | torstenvl 4 hours ago | |
I don't think clang is being "aggressive" on ARM, it's just that all aarch64 targets support fma. You'll get similar results with vfmadd213ss on x86-64 with -march=haswell (13 years old at this point, probably a safe bet).
Clang armv8 21.1.0:
Clang x86-64 21.1.0: | ||
| ▲ | AlotOfReading 4 hours ago | parent [-] | |
The point is that there are multiple, meaningfully different implementations for the same line, not that either is wrong. Sometimes compilers will even produce both implementations and call one or the other based on runtime checks, as this ICC example does: | ||