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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
         Depends on|                            |23782

--- Comment #5 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
(In reply to Andrew Pinski from comment #4)
> My fix for PR 14295 improves the situtation. and I will look into the other
> parts after that patch goes in.

Note with the patch for PR 14295 with `-fstack-reuse=none`, there are less
extra moves going on. So that is the good news. 

For the case without `-fstack-reuse=none`, I need to handle stuff like this:
```
  g1b = D.23293;
  # .MEM_113 = VDEF <.MEM_112>
  __b ={v} {CLOBBER(eos)};
  _101 = BIT_FIELD_REF <o1v_41(D), 32, 32>;
  _9 = (sizetype) _101;
  _10 = in_59(D) + _9;
  # .MEM_117 = VDEF <.MEM_113>
  __b = g1b;
```

And also handle this:
```
  # .MEM_142 = VDEF <.MEM_138>
  __b = D.23251;
  # .MEM_143 = VDEF <.MEM_142>
  D.23244 = __builtin_aarch64_ld2_lanev16qi_usus (_28, __b, 12);
```

Replace __b in the call with D.23251 which is the same as PR 23782.


Referenced Bugs:

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=23782
[Bug 23782] SRA pessimizes passing structures by value at -Os (+22% code size)

Reply via email to