Next up, the elimination of the -mvsx-small-integer option. This patch is a little more complex than the previous patches. The -mvsx-small-integer was set with -mpower8-vector or -mcpu=power8, and it would enable SImode to go into vector registers. While power7 had the instructions to support 32-bit integer load/stores, because it didn't have direct move between the GPR and VSX registers, it was complicating the code generation.
If the user used -mpower9-vector or -mcpu=power9, the QImode and HImode types also would be allowed in vector registers (ISA 2.07/power8 did not have general purpose load and store byte/halfword instructions). Because it enables different code based on the cpu, the changes were different. In the places that were checking for SImode, the TARGET_VSX_SMALL_INTEGER test was replaced with TARGET_P8_VECTOR. However, in the places that were checking for QImode/HImode, there was already a guard test for TARGET_P9_VECTOR. In those cases, I did not add a test for TARGET_P8_VECTOR. I've checked this on both a big endian power8 system and a little endian power7 system, doing both bootstraps and make check. There were no regressions. Can I check these changes into the trunk? My next cleanup patch may be elimination of the three options for power9/ISA 3.0 d-form (register+offset) support. Another one will probably be deleting of the direct move option (power8/ISA 2.07). [gcc] 2017-07-25 Michael Meissner <meiss...@linux.vnet.ibm.com> * config/rs6000/rs6000-cpus.def (ISA_2_7_MASKS_SERVER): Delete -mvsx-small-integer option. (ISA_3_0_MASKS_IEEE): Likewise. (POWERPC_MASKS): Likewise. * config/rs6000/rs6000.opt (-mvsx-small-integer): Likewise. * config/rs6000/rs6000.c (rs6000_hard_regno_mode_ok): Simplify code, only testing for DImode being allowed in non-VSX floating point registers. (rs6000_init_hard_regno_mode_ok): Change TARGET_VSX_SMALL_INTEGER to TARGET_P8_VECTOR test. Remove redundant VSX test inside of another VSX test. (rs6000_option_override_internal): Delete -mvsx-small-integer. (rs6000_expand_vector_set): Change TARGET_VSX_SMALL_INTEGER to TARGET_P8_VECTOR test. (rs6000_secondary_reload_simple_move): Likewise. (rs6000_preferred_reload_class): Delete TARGET_VSX_SMALL_INTEGER, since TARGET_P9_VECTOR was already tested. (rs6000_opt_masks): Remove -mvsx-small-integer. * config/rs6000/vsx.md (vsx_extract_<mode>): Delete TARGET_VSX_SMALL_INTEGER, since a test for TARGET_P9_VECTOR was used. (vsx_extract_<mode>_p9): Delete TARGET_VSX_SMALL_INTEGER, since a test for TARGET_VEXTRACTUB was used, and that uses TARGET_P9_VECTOR. (p9 extract splitter): Likewise. (vsx_extract_<mode>_di_p9): Likewise. (vsx_extract_<mode>_store_p9): Likewise. (vsx_extract_si): Delete TARGET_VSX_SMALL_INTEGER, since a test for TARGET_P9_VECTOR was used. Delete code that is now dead with the elimination of TARGET_VSX_SMALL_INTEGER. (vsx_extract_<mode>_p8): Likewise. (vsx_ext_<VSX_EXTRACT_I:VS_scalar>_fl_<FL_CONV:mode>): Likewise. (vsx_ext_<VSX_EXTRACT_I:VS_scalar>_ufl_<FL_CONV:mode>): Likewise. (vsx_set_<mode>_p9): Likewise. (vsx_set_v4sf_p9): Likewise. (vsx_set_v4sf_p9_zero): Likewise. (vsx_insert_extract_v4sf_p9): Likewise. (vsx_insert_extract_v4sf_p9_2): Likewise. * config/rs6000/rs6000.md (sign extend splitter): Change TARGET_VSX_SMALL_INTEGER to TARGET_P8_VECTOR test. (floatsi<mode>2_lfiwax_mem): Likewise. (floatunssi<mode>2_lfiwzx_mem): Likewise. (float<QHI:mode><FP_ISA3:mode>2): Delete TARGET_VSX_SMALL_INTEGER, since a test for TARGET_P9_VECTOR was used. (float<QHI:mode><FP_ISA3:mode>2_internal): Likewise. (floatuns<QHI:mode><FP_ISA3:mode>2): Likewise. (floatuns<QHI:mode><FP_ISA3:mode>2_internal): Likewise. (fix_trunc<mode>si2): Change TARGET_VSX_SMALL_INTEGER to TARGET_P8_VECTOR test. (fix_trunc<mode>si2_stfiwx): Likewise. (fix_trunc<mode>si2_internal): Likewise. (fix_trunc<SFDF:mode><QHI:mode>2): Delete TARGET_VSX_SMALL_INTEGER, since a test for TARGET_P9_VECTOR was used. (fix_trunc<SFDF:mode><QHI:mode>2_internal): Likewise. (fixuns_trunc<mode>si2): Change TARGET_VSX_SMALL_INTEGER to TARGET_P8_VECTOR test. (fixuns_trunc<mode>si2_stfiwx): Likewise. (fixuns_trunc<SFDF:mode><QHI:mode>2): Delete TARGET_VSX_SMALL_INTEGER, since a test for TARGET_P9_VECTOR was used. (fixuns_trunc<SFDF:mode><QHI:mode>2_internal): Likewise. (fctiw<u>z_<mode>_smallint): Delete TARGET_VSX_SMALL_INTEGER, since a test for TARGET_P9_VECTOR was used. (splitter for loading small constants): Likewise. [gcc/testsuite] 2017-07-25 Michael Meissner <meiss...@linux.vnet.ibm.com> * gcc.target/powerpc/vsx-himode.c: Delete -mvsx-small-integer option. * gcc.target/powerpc/vsx-himode2.c: Likewise. * gcc.target/powerpc/vsx-himode3.c: Likewise. * gcc.target/powerpc/vsx-qimode.c: Likewise. * gcc.target/powerpc/vsx-qimode2.c: Likewise. * gcc.target/powerpc/vsx-qimode3.c: Likewise. * gcc.target/powerpc/vsx-simode.c: Likewise. * gcc.target/powerpc/vsx-simode2.c: Likewise. * gcc.target/powerpc/vsx-simode3.c: Likewise. -- Michael Meissner, IBM IBM, M/S 2506R, 550 King Street, Littleton, MA 01460-6245, USA email: meiss...@linux.vnet.ibm.com, phone: +1 (978) 899-4797