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

--- Comment #9 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
(In reply to Andrew Pinski from comment #3)
> Actually it is because in this case it is a partial write and not a full
> write of the v256_t .
> 
> So my patch does not fix it.

But it might help the second example. 

```
  _11 = VIEW_CONVERT_EXPR<uint128_t>(a_4(D));
  MEM[(union simde__m128_private *)&D.62853] = _11;
  a_ = D.62853;
  r_.m128_private[0] = D.62853;
  v = r_;
  _7 = MEM <simde__m256> [(char * {ref-all})&v];
  v ={v} {CLOBBER(eos)};
  <retval> = _7;
```

Should be converted into:
```
  _11 = VIEW_CONVERT_EXPR<uint128_t>(a_4(D));
  MEM[(union simde__m128_private *)&D.62853] = _11;
  a_ = VIEW_CONVERT_EXPR<union simde__m128_private>(_11);
  VIEW_CONVERT_EXPR<union simde__m128_private>(r_.m128_private[0]) = _11;
 // v = r_; // removed with the dse
  _7 = VIEW_CONVER_EXPR<simde__m256>(r_);
  v ={v} {CLOBBER(eos)};
  <retval> = _7;
```

Which should provide SRA with better input.

On the insert:
```
  a_ ={v} {CLOBBER(bob)};
  MEM <simde__m256> [(char * {ref-all})&a_] = a_4(D);
  b_ ={v} {CLOBBER(bob)};
  _15 = VIEW_CONVERT_EXPR<uint128_t>(b_7(D));
  MEM[(union simde__m128_private *)&D.62863] = _15;
  b_ = D.62863;
  a_.m128_private[imm8_9(D)] = D.62863;
  v = a_;
  _11 = MEM <simde__m256> [(char * {ref-all})&v];
  v ={v} {CLOBBER(eos)};
  <retval> = _11;
  a_ ={v} {CLOBBER(eos)};
  b_ ={v} {CLOBBER(eos)};
```

Converted to:
```

  a_ ={v} {CLOBBER(bob)};
  MEM <simde__m256> [(char * {ref-all})&a_] = a_4(D);
  b_ ={v} {CLOBBER(bob)};
  _15 = VIEW_CONVERT_EXPR<uint128_t>(b_7(D));
  MEM[(union simde__m128_private *)&D.62863] = _15;
  //b_ = D.62863;
  a_.m128_private[imm8_9(D)] = D.62863;
  //v = a_;
  _11 = VIEW_CONVERT_EXPR <simde__m256>(a_);
  v ={v} {CLOBBER(eos)};
  <retval> = _11;
  a_ ={v} {CLOBBER(eos)};
  b_ ={v} {CLOBBER(eos)};
```

Which also should help ESRA.

Reply via email to