PR92760 exposed one issue that VECTOR_UNIT_NONE_P (V2DImode) is true on Power7
then we won't return it as preferred_simd_mode but ISA 2.06 (Power7) does
introduce partial support on vector doubleword (very limitted) and more basic
support origins from ISA 2.07 (Power8) though. To make vectorizer still
leverage those few but available V2DImode related instructions, we need to
claim it's available on VSX (Power7 and up).
gcc/ChangeLog
PR target/92760
* gcc/config/rs6000/rs6000.c (rs6000_preferred_simd_mode): Use
VECTOR_MEM_NONE_P instead of VECTOR_UNIT_NONE_P.
From-SVN: r278955
+2019-12-04 Kewen Lin <linkw@gcc.gnu.org>
+
+ PR target/92760
+ * gcc/config/rs6000/rs6000.c (rs6000_preferred_simd_mode): Use
+ VECTOR_MEM_NONE_P instead of VECTOR_UNIT_NONE_P.
+
2019-12-03 Jan Hubicka <hubicka@ucw.cz>
* ipa-fnsummary.c: Include tree-into-ssa.h.
{
opt_machine_mode vmode = mode_for_vector (mode, 16 / GET_MODE_SIZE (mode));
- if (vmode.exists () && !VECTOR_UNIT_NONE_P (vmode.require ()))
+ if (vmode.exists () && !VECTOR_MEM_NONE_P (vmode.require ()))
return vmode.require ();
return word_mode;