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

--- Comment #4 from JuzheZhong <juzhe.zhong at rivai dot ai> ---
I see.

https://godbolt.org/z/cbW8535W1

The ifcvt is incorrect.

  iftmp.0_11 = _40 ? 0B : g;
  _ifc__51 = .COND_IOR (_40, d_lsm.11_10, 1, d_lsm.11_10);

_40 is QImode. The later loop vectorizer vectorize _40 into vector QImode
which is wrong for mask argument. 

The later OPTAB expand ICE.


It's obvious, the correct should be:

  iftmp.0_11 = _40 ? 0B : g;
  _ifc__51 = .COND_IOR (iftmp.0_11, d_lsm.11_10, 1, d_lsm.11_10);

It's odd that ARM SVE didn't generate COND_IOR in ifcvt:

https://godbolt.org/z/83xcWorPa

I think it's very likely caused by Robin's ifcvt patch.

CCing Robin who should know the best.

Reply via email to