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

Richard Biener <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Blocks|                            |99728

--- Comment #4 from Richard Biener <rguenth at gcc dot gnu.org> ---
PR99728 is similar, but I think that store-motion itself is the wrong place to
"tear apart" aggregate assignments.  Taking the first example from the
testcase:

/* This loop doesn't get optimized away.  */
void
loop2_using_struct_assignment (int num_iters, struct value *arr)
{
  int i;
  for (i = 0; i < num_iters; i++)
    {
      arr[0].union_field.int_field = i;
      arr[0].type_code             = TYPE_CODE_INT;
      arr[1] = arr[0];
    }
}

the aggregate assignment could be sunk out of the loop but then this moves
loads later which store-motion does not do in general.


Referenced Bugs:

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99728
[Bug 99728] code pessimization when using wrapper classes around SIMD types

Reply via email to