https://gcc.gnu.org/bugzilla/show_bug.cgi?id=120941
--- Comment #24 from H.J. Lu <hjl.tools at gmail dot com> --- (In reply to Filip Kastl from comment #23) > ---- testcase.c ---- > enum { ST, SB, ET, EB, WT, WB } > LBM_initializeGrid() { > double *grid; > grid[ST] = grid[SB] = grid[ET] = grid[EB] = > grid[WT] = grid[WB] = 1.0 / 36.0; > } > ---- ---- > > Compile with -Ofast -march=znver2 -c -fdump-rtl-all. In the dump, you > should find: > > ---------------- > Replace: > > (insn 5 2 7 2 (set (reg:V2DF 101) > (vec_duplicate:V2DF (mem/u/c:DF (symbol_ref/u:DI ("*.LC1") [flags > 0x2]) [0 S8 A64]))) "testcase.c":5:16 7168 {vec_dupv2df} > (expr_list:REG_EQUAL (const_vector:V2DF [ > (const_double:DF > 2.7777777777777776235801354687282582744956016540527344e-2 > [0x0.e38e38e38e38ep-5]) repeated x2 > ]) > (nil))) > > with: > > (insn 5 2 7 2 (set (reg:V2DF 101) > (subreg:V2DF (reg:V4DF 104) 0)) "testcase.c":5:16 2429 > {movv2df_internal} > (expr_list:REG_EQUAL (const_vector:V2DF [ > (const_double:DF > 2.7777777777777776235801354687282582744956016540527344e-2 > [0x0.e38e38e38e38ep-5]) repeated x2 > ]) > (nil))) > > deferring rescan insn with uid = 5. > > Replace: > > (insn 8 7 10 2 (set (reg:V4DF 103) > (vec_duplicate:V4DF (mem/u/c:DF (symbol_ref/u:DI ("*.LC1") [flags > 0x2]) [0 S8 A64]))) "testcase.c":4:12 9260 {vec_dupv4df} > (expr_list:REG_EQUAL (const_vector:V4DF [ > (const_double:DF > 2.7777777777777776235801354687282582744956016540527344e-2 > [0x0.e38e38e38e38ep-5]) repeated x4 > ]) > (nil))) > > with: > > (insn 8 7 10 2 (set (reg:V4DF 103) > (reg:V4DF 104)) "testcase.c":4:12 2428 {movv4df_internal} > (expr_list:REG_EQUAL (const_vector:V4DF [ > (const_double:DF > 2.7777777777777776235801354687282582744956016540527344e-2 > [0x0.e38e38e38e38ep-5]) repeated x4 > ]) > (nil))) > ------------------ > > Works even on the current master (r16-2091-g20407a41e84044). I got this > from machine reducing the source files using cvise. Why is it bad for znver2?