https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103959
Bug ID: 103959 Summary: float64x1_t not using fmov to generate some float values Product: gcc Version: 12.0 Status: UNCONFIRMED Keywords: missed-optimization Severity: enhancement Priority: P3 Component: target Assignee: unassigned at gcc dot gnu.org Reporter: pinskia at gcc dot gnu.org Target Milestone: --- Target: aarch64-*-* #include <arm_neon.h> Take: double ff(void) { return 2.0; } float64x1_t g(void) { return (float64x1_t){2.0}; } ---- CUT ---- These should produce the same code but currently does not. ff: fmov d0, 2.0e+0 ret g: mov x0, 4611686018427387904 fmov d0, x0 ret I Noticed this while working on PR 64821 where we now fold sqrt but get g.