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

            Bug ID: 110429
           Summary: Redundant vector extract instruction on P9
           Product: gcc
           Version: 13.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: target
          Assignee: unassigned at gcc dot gnu.org
          Reporter: guihaoc at gcc dot gnu.org
  Target Milestone: ---

//test.c
#include <altivec.h>
void extract_int_2 (int *p, vector int a) { *p = vec_extract (a, 2); }

On P9 LE, it generates
        xxextractuw 34,34,4
        stxsiwx 34,0,3

The xxextractuw is unnecessary as the extracted int is just at word[1].

Reply via email to