rs6000: Use known constant for GET_MODE_NUNITS and similar
authorKewen Lin <linkw@linux.ibm.com>
Mon, 17 Jan 2022 04:55:42 +0000 (22:55 -0600)
committerKewen Lin <linkw@linux.ibm.com>
Mon, 17 Jan 2022 05:43:23 +0000 (23:43 -0600)
commitb3e77224edbcb06cfd6ef585c11fc2c7d9672a16
treef963a90de8dd6f63e0bc3284e6b6cf84c07dec82
parent240dd6c063b481c092c9ec406b69b400f6f033f1
rs6000: Use known constant for GET_MODE_NUNITS and similar

This patch is to clean up some codes with GET_MODE_UNIT_SIZE or
GET_MODE_NUNITS, which can use known constants or just be removed.

Note that Carl Love helped to confirm altivec_vreveti2 introduced
in r12-1341 is useless and can be removed.

gcc/ChangeLog:

* config/rs6000/altivec.md (altivec_vreveti2): Remove.
* config/rs6000/vsx.md (*vsx_extract_si, *vsx_extract_si_<uns>float_df,
*vsx_extract_si_<uns>float_<mode>, *vsx_insert_extract_v4sf_p9): Use
known constant values to simplify code.
gcc/config/rs6000/altivec.md
gcc/config/rs6000/vsx.md