https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106769
Bug ID: 106769 Summary: PPCLE: vec_extract(vector unsigned int) unnecessary rldicl after mfvsrwz Product: gcc Version: 11.2.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: target Assignee: unassigned at gcc dot gnu.org Reporter: jens.seifert at de dot ibm.com Target Milestone: --- #include <altivec.h> unsigned int extr(vector unsigned int v) { return vec_extract(v, 2); } Generates: _Z4extrDv4_j: .LFB1: .cfi_startproc mfvsrwz 3,34 rldicl 3,3,0,32 blr .long 0 .byte 0,9,0,0,0,0,0,0 .cfi_endproc The rldicl is not necessary as mfvsrwz already wiped out the upper 32 bits of the register.