https://gcc.gnu.org/g:ca96c1d1bc04b498e401571e99296e526db5db58

commit r15-5552-gca96c1d1bc04b498e401571e99296e526db5db58
Author: Kewen Lin <li...@linux.ibm.com>
Date:   Thu Nov 21 07:41:33 2024 +0000

    rs6000: Remove entry for V1TImode from VI_unit
    
    When making a patch to adjust VECTOR_P8_VECTOR rs6000_vector
    enum, I noticed that V1TImode's mode attribute in VI_unit
    VECTOR_UNIT_ALTIVEC_P (V1TImode) is never true, since
    VECTOR_UNIT_ALTIVEC_P checks if vector_unit[V1TImode] is
    equal to VECTOR_ALTIVEC, but vector_unit[V1TImode] can only
    be VECTOR_NONE or VECTOR_P8_VECTOR, there is no chance to be
    VECTOR_ALTIVEC:
      rs6000_vector_unit[V1TImode]
          = (TARGET_P8_VECTOR) ? VECTOR_P8_VECTOR : VECTOR_NONE;
    
    By checking all uses of VI_unit, the used mode iterator is
    one of VI2, VI, VP_small and VP, none of them has V1TImode,
    so the entry for V1TImode is useless.  I guessed it was
    designed to have one mode attribute to cover all integer
    vector modes, but later we separated V1TI handlings to its
    own patterns (those guarded with TARGET_VADDUQM).  Anyway,
    this patch is to remove this useless and confusing entry.
    
    gcc/ChangeLog:
    
            * config/rs6000/altivec.md (mode attr for V1TI in VI_unit): Remove.

Diff:
---
 gcc/config/rs6000/altivec.md | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/gcc/config/rs6000/altivec.md b/gcc/config/rs6000/altivec.md
index 00dad4b91f1c..687c3c0ac7e1 100644
--- a/gcc/config/rs6000/altivec.md
+++ b/gcc/config/rs6000/altivec.md
@@ -227,8 +227,7 @@
 (define_mode_attr VI_unit [(V16QI "VECTOR_UNIT_ALTIVEC_P (V16QImode)")
                           (V8HI "VECTOR_UNIT_ALTIVEC_P (V8HImode)")
                           (V4SI "VECTOR_UNIT_ALTIVEC_P (V4SImode)")
-                          (V2DI "VECTOR_UNIT_P8_VECTOR_P (V2DImode)")
-                          (V1TI "VECTOR_UNIT_ALTIVEC_P (V1TImode)")])
+                          (V2DI "VECTOR_UNIT_P8_VECTOR_P (V2DImode)")])
 
 ;; Vector pack/unpack
 (define_mode_iterator VP [V2DI V4SI V8HI])

Reply via email to