diff options
author | Kewen Lin <linkw@linux.ibm.com> | 2021-10-28 01:11:56 -0500 |
---|---|---|
committer | Kewen Lin <linkw@linux.ibm.com> | 2021-10-28 02:45:55 -0500 |
commit | b343a29dbcbfc5eaca11243ac603a1e5b48630f3 (patch) | |
tree | eadded5b9791d06c64dbefdd7a20ccbc9215eef5 /gcc/tree-vrp.c | |
parent | 2dc835cd0b5183a0e30b2b052362ad05f5c082b0 (diff) | |
download | gcc-b343a29dbcbfc5eaca11243ac603a1e5b48630f3.zip gcc-b343a29dbcbfc5eaca11243ac603a1e5b48630f3.tar.gz gcc-b343a29dbcbfc5eaca11243ac603a1e5b48630f3.tar.bz2 |
rs6000: Fix ICE of vect cost related to V1TI [PR102767]
As PR102767 shows, the commit r12-3482 exposed one ICE in function
rs6000_builtin_vectorization_cost. We claims V1TI supports
movmisalign on rs6000 (See define_expand "movmisalign<mode>"), so
it return true in rs6000_builtin_support_vector_misalignment for
misalign 8. Later in the cost querying function
rs6000_builtin_vectorization_cost, we don't have the arms to handle
the V1TI input under (TARGET_VSX && TARGET_ALLOW_MOVMISALIGN).
The proposed fix is to add the consideration for V1TI, simply make
it as the cost for doubleword which is apparently bigger than the
cost of scalar, won't have the vectorization to happen, just to
keep consistency and avoid ICE. Another thought is to not support
movmisalign for V1TI, but it sounds like a bad idea since it doesn't
match the reality.
Note that this patch also fixes up the wrong indentations around.
gcc/ChangeLog:
PR target/102767
* config/rs6000/rs6000.c (rs6000_builtin_vectorization_cost): Consider
V1T1 mode for unaligned load and store.
gcc/testsuite/ChangeLog:
PR target/102767
* gcc.target/powerpc/ppc-fortran/pr102767.f90: New file.
Diffstat (limited to 'gcc/tree-vrp.c')
0 files changed, 0 insertions, 0 deletions