Make vsx_splat_<mode>_reg use correct insn attributes, PR target/99293
In looking at PR target/99293, I noticed that the code in the insn vsx_splat_<mode>_reg used "vecmove" as the "type" insn attribute when the "mtvsrdd" is generated. It should use "mfvsr". I also added a "p9v" isa attribute for that alternative. I have built the spec 2017 benchmark with this patch (#2) and the next patch (#3), along with the first patch in the series for power9 and power10 targets. Most of the floating point benchmarks changed code slightly, due to the scheduling changes that came from changing the insn type attribute. I ran the spec 2017 suite on power9, and I did not not notice any significant changes from these changes. The power9 benchmarks that had code differences with these 2 patches applied in addition to the build with just the first patch applied were: namd_r, pareset_r, povray_r, wrf_r, blender_r, cam4_r, deepsjeng_r, imagick_r, roms_r The power9 benchmarks that had code differences with these 2 patches applied in addition to the build with just the first patch applied were (cactuBSSN_r had changes for power10 but not power9): cactuBSSN_r, namd_r, pareset_r, povray_r, wrf_r, blender_r, cam4_r, deepsjeng_r, imagick_r, nab_r, roms_r I have built bootstrap versions on the following systems. There were no regressions in the runs: Power9 little endian, --with-cpu=power9 Power10 little endian, --with-cpu=power10 Power8 big endian, --with-cpu=power8 (both 32-bit & 64-bit tests) Can I install this into the trunk? After a burn-in period, can I backport and install this into GCC 11 and GCC 10 branches? 2022-03-28 Michael Meissner <meiss...@linux.ibm.com> gcc/ PR target/99293 * config/rs6000/rs6000.md (vsx_splat_<mode>_reg): Use the correct insn type attribute. Add "p9v" isa attribute for generating the mtvsrdd instruction. --- gcc/config/rs6000/vsx.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/gcc/config/rs6000/vsx.md b/gcc/config/rs6000/vsx.md index ddafbe471dd..ad722cff70f 100644 --- a/gcc/config/rs6000/vsx.md +++ b/gcc/config/rs6000/vsx.md @@ -4580,7 +4580,8 @@ (define_insn "vsx_splat_<mode>_reg" "@ xxpermdi %x0,%x1,%x1,0 mtvsrdd %x0,%1,%1" - [(set_attr "type" "vecperm,vecmove")]) + [(set_attr "type" "vecperm,mtvsr") + (set_attr "isa" "*,p9v")]) (define_insn "vsx_splat_<mode>_mem" [(set (match_operand:VSX_D 0 "vsx_register_operand" "=wa") -- 2.35.1 -- Michael Meissner, IBM PO Box 98, Ayer, Massachusetts, USA, 01432 email: meiss...@linux.ibm.com