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

--- Comment #11 from Alexey Merzlyakov <alexey.merzlyakov at samsung dot com> 
---
> So I'd first look at why we created an explicit store through memory rather 
> than simple x.y assignment like we see for D.19566.first.

For the examples from "Item1" and "Item2", GCC does not generate any memory
access instruction on tree-level. E.g. for mentioned above "Item1" testcase,
.optimized will give the following dump:

  struct value func (unsigned int a, unsigned int b)
  {
    struct value D.2333;
    ...
    D.2333.a = a_4(D);
    D.2333.b = _2;
    return D.2333;
  }

Stack usage for this code is being generated later on the "expand" stage when
we are addressing local D.2333 variable. It means, that probably there might be
no easy way how to fix it on tree-level and the solution have to be RTL- /
DSE-based.

Reply via email to