https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100253
Andrew Pinski <pinskia at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |NEW Component|rtl-optimization |tree-optimization Last reconfirmed| |2021-04-25 Ever confirmed|0 |1 --- Comment #2 from Andrew Pinski <pinskia at gcc dot gnu.org> --- The problem is right away in expand: ;; vect__36.383_12 = MEM <vector(1) __int128 unsigned> [(char * {ref-all})_10 + 16B]; (insn 23 22 0 (set (reg:V1TI 88 [ vect__36.383 ]) (mem:V1TI (plus:DI (reg/f:DI 86 [ _10 ]) (const_int 16 [0x10])) [0 MEM <vector(1) __int128 unsigned> [(char * {ref-all})_10 + 16B]+0 S16 A128])) -1 (nil)) I think SLP did not mark the load as unaligned even though it knows it is one: t.cc:7:8: note: Vectorizing an unaligned access. t.cc:7:8: note: vect_model_load_cost: unaligned supported by hardware. t.cc:7:8: note: vect_model_load_cost: inside_cost = 24, prologue_cost = 0 . t.cc:7:8: note: ==> examining statement: MEM <__int128 unsigned> [(char * {ref-all})&s + 25B] = _36; t.cc:7:8: note: vect_is_simple_use: operand # VUSE <.MEM_30> MEM <__int128 unsignedD.19> [(charD.10 * {ref-all})_10], type of def: internal t.cc:7:8: note: vect_is_simple_use: operand # VUSE <.MEM_35> MEM <__int128 unsignedD.19> [(charD.10 * {ref-all})_19], type of def: internal t.cc:7:8: note: Vectorizing an unaligned access. t.cc:7:8: note: vect_model_store_cost: unaligned supported by hardware. Confirmed. When -fno-tree-bit-ccp is turned off, the prop of the unalignedness does not happen.