From c96828f1ec5bb54524697bd0f3fb22088fda5342 Mon Sep 17 00:00:00 2001 From: Kewen Lin Date: Wed, 4 Dec 2019 05:10:46 +0000 Subject: [PATCH] [rs6000] Fix PR92760 by checking VECTOR_MEM_NONE_P instead 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 --- gcc/ChangeLog | 6 ++++++ gcc/config/rs6000/rs6000.c | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index cffe0fb58a9..e04a48a3880 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2019-12-04 Kewen Lin + + 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 * ipa-fnsummary.c: Include tree-into-ssa.h. diff --git a/gcc/config/rs6000/rs6000.c b/gcc/config/rs6000/rs6000.c index 3c22f64c139..23b6d99609b 100644 --- a/gcc/config/rs6000/rs6000.c +++ b/gcc/config/rs6000/rs6000.c @@ -4917,7 +4917,7 @@ rs6000_preferred_simd_mode (scalar_mode mode) { 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; -- 2.30.2