[Bug rtl-optimization/107774] New: rtl failed to simplify subreg:vec_select to just vec_select.

crazylht at gmail dot com gcc-bugzilla@gcc.gnu.org
Mon Nov 21 02:18:13 GMT 2022


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

            Bug ID: 107774
           Summary: rtl failed to simplify subreg:vec_select to just
                    vec_select.
           Product: gcc
           Version: 13.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: rtl-optimization
          Assignee: unassigned at gcc dot gnu.org
          Reporter: crazylht at gmail dot com
  Target Milestone: ---

When i'm looking at
https://gcc.gnu.org/pipermail/gcc-patches/2022-November/606373.html, I notice
there's some misoptimization in rtl.

It failed to simplift (subreg:SF (vec_select:V2SF (reg:V4SF) (parallel
[(const_int 2) (const_int 3)]) 0) to just (vec_select:SF (reg:V4SF) (parallel
[(const_int 2)])

The optimization is exposed after adjustment of ix86_can_change_mode_class, w/o
that, i don't have a case to reproduce this issue. But I can think backends
canonicalizing vec_select to subreg may have such issue.


More information about the Gcc-bugs mailing list