https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99293
Segher Boessenkool <segher at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |NEW Last reconfirmed| |2021-02-27 Ever confirmed|0 |1 --- Comment #2 from Segher Boessenkool <segher at gcc dot gnu.org> --- It generates non-optimal code for older CPUs as well (it does two splats instead of one: xxpermdi 0,35,35,3 # 7 [c=4 l=4] vsx_extract_v2di/1 xxpermdi 35,0,0,0 # 9 [c=4 l=4] vsx_splat_v2di_reg/0 vrlq 2,2,3 This is because we get things like Trying 7 -> 9: 7: r117:DI=vec_select(r127:V1TI#0,parallel) REG_DEAD r127:V1TI 9: r124:V2DI=vec_duplicate(r117:DI) REG_DEAD r117:DI Failed to match this instruction: (set (reg:V2DI 124) (vec_duplicate:V2DI (vec_select:DI (subreg:V2DI (reg:V1TI 127) 0) (parallel [ (const_int 0 [0]) ])))) (the patterns we do have use vec_concat instead). Confirmed.