https://gcc.gnu.org/bugzilla/show_bug.cgi?id=116229
Tamar Christina <tnfchris at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|unassigned at gcc dot gnu.org |tnfchris at gcc dot gnu.org Status|NEW |ASSIGNED --- Comment #3 from Tamar Christina <tnfchris at gcc dot gnu.org> --- (In reply to Andrew Pinski from comment #2) > /* For Advanced SIMD we can create an integer with only the top bit set > using fneg (0.0f). */ > > is wrong in aarch64_maybe_generate_simd_constant. > > it should use either an unspec here or an XOR instead of fneg here I think > especially for -ffast-math reasons. XOR would defeat the point of the optimization. The original expression is fine but relied on nothing in the late pipeline being able to fold the zero constant back in. It was for this reason that we explicitly forced it to a separate register. Late combine is just doing something not possible before. I'll fix it.