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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2025-11-20
     Ever confirmed|0                           |1
            Summary|[16 Regression] useless     |[16 Regression] signed to
                   |type conversions inserted   |unsigned type conversions
                   |during vectorization        |inserted during
                   |blocking MLA                |vectorization blocking MLA
          Component|target                      |tree-optimization

--- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
```
  vect_x_19.27_96 = .COND_FMA (loop_mask_87, vect__21.23_89,
vect_vec_iv_.24_91, vect_x_26.26_95, vect_x_26.26_95);
```
vs now:
```
  vect__20.26_113 = vect__21.24_109 * vect_vec_iv_.25_111;
  vect_x_19.29_116 = VIEW_CONVERT_EXPR<vector([4,4]) unsigned
int>(vect__20.26_113);
  vect_x_19.29_117 = VIEW_CONVERT_EXPR<vector([4,4]) unsigned
int>(vect_x_26.27_115);
  vect_x_19.29_118 = .COND_ADD (loop_mask_107, vect_x_19.29_116,
vect_x_19.29_117, vect_x_19.29_117);
  vect_x_19.28_119 = VIEW_CONVERT_EXPR<vector([4,4]) int>(vect_x_19.29_118);

```

I suspect the code in tree-ssa-math-opts.cc needs to add the support for
optional nop_converts and convert the multiply into unsigned case too. They are
not useless with respect to overflow.


And there is no non-predicated FMA:
```
Trying 39 -> 42:
   39: r178:VNx4SI=r174:VNx4SI*r119:VNx4SI
      REG_DEAD r174:VNx4SI
   42: r127:VNx4SI=r178:VNx4SI+r127:VNx4SI
      REG_DEAD r178:VNx4SI
Failed to match this instruction:
(set (reg:VNx4SI 127 [ vect_x_12.16 ])
    (plus:VNx4SI (mult:VNx4SI (reg:VNx4SI 174 [ vect__4.12_45 ])
            (reg:VNx4SI 119 [ vect_vec_iv_.13 ]))
        (reg:VNx4SI 127 [ vect_x_12.16 ])))
```

Reply via email to