[Bug tree-optimization/126788] __builtin_convertvector upconvert + downconvert doesn't cancel out

rguenth at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Thu Aug 13 12:52:08 GMT 2026


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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |ASSIGNED
           Assignee|unassigned at gcc dot gnu.org      |rguenth at gcc dot gnu.org

--- Comment #2 from Richard Biener <rguenth at gcc dot gnu.org> ---
r17-3258-g4c136e1d333bc4 doesn't fix this.  Only after vector lowering we
open-code .VEC_CONVERT:

  z_2 = (v2di) a_1(D);
  _3 = (v2si) z_2;

the issue is that supportable_convert_operation doesn't consider no
conversion necessary (or a sign-conversion via V_C_E).

I have a patch.


More information about the Gcc-bugs mailing list