https://gcc.gnu.org/bugzilla/show_bug.cgi?id=123458

Andrew Pinski <pinskia at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           See Also|                            |https://gcc.gnu.org/bugzill
                   |                            |a/show_bug.cgi?id=115576,
                   |                            |https://gcc.gnu.org/bugzill
                   |                            |a/show_bug.cgi?id=120588
     Ever confirmed|0                           |1
          Component|middle-end                  |target
             Target|                            |x86_64
   Last reconfirmed|                            |2026-01-08
   Target Milestone|---                         |14.4
           Keywords|                            |missed-optimization
             Status|UNCONFIRMED                 |NEW

--- Comment #2 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
I am 99% sure this is a x86_64 specific issue.

aarch64 produces good code for the long case.
For the int case it is shift and such which is the best code based on the ABI.

So the corrected testcase is:
```

struct span {
    long p;
    long size;
};

void f(struct span);
void g(long p, long size) { return f((struct span){p, size}); }
```

Reply via email to