On 12/28/23 17:42, Li, Pan2 wrote:
Thanks Jeff for comments, and Happy new year!
Interesting. So I'd actually peel one more layer off this onion. Why
do the aarch64 and riscv targets generate different constants (0.0 vs
-0.0)?
Yeah, it surprise me too when debugging the foo function. But didn't dig into
it in previous as it may be unrelated to vectorize.
Is it possible that the aarch64 is generating 0.0 when asked for -0.0
and -fno-signed-zeros is in effect? That's a valid thing to do when
-fno-signed-zeros is on. Look for HONOR_SIGNED_ZEROs in the aarch64
backend.
Sure, will have a try for making the -0.0 happen in aarch64.
I would first look at the .optimized dump, then I'd look at the .final
dump alongside the resulting assembly for aarch64.
I bet we're going to find that the aarch64 target internally converts
-0.0 to 0.0 when we're not honoring signed zeros.
jeff