Hi! On Tue, Dec 03, 2019 at 05:38:41PM +0800, Kewen.Lin wrote: > 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). > > Instead of using VECTOR_UNIT_NONE_P, this fix is to use VECTOR_MEM_NONE_P > instead. I was intended to use both VECTOR_UNIT_NONE_P and VECTOR_MEM_NONE_P > together but noticed that MEM is like a super set of UNIT in current > implementation, I think it would be enough.
Yes. This hook should return what mode we want to use, and !MEM_NONE is a better match to what we want there. > 2019-12-03 Kewen Lin <li...@gcc.gnu.org> > > PR target/92760 > * gcc/config/rs6000/rs6000.c (rs6000_preferred_simd_mode): Update > VECTOR_UNIT_NONE_P by VECTOR_MEM_NONE_P. (Maybe better is "Use VECTOR_MEM_NONE_P instead of VECTOR_UNIT_NONE_P."?) Okay for trunk. Thanks! Segher