Pushed to r15-6487.

在 2024/12/30 上午10:34, Guo Jie 写道:
gcc/ChangeLog:

        * config/loongarch/lasx.md: Remove useless code.
        * config/loongarch/lsx.md: Ditto.

---
  gcc/config/loongarch/lasx.md | 66 ------------------------------------
  gcc/config/loongarch/lsx.md  | 35 -------------------
  2 files changed, 101 deletions(-)

diff --git a/gcc/config/loongarch/lasx.md b/gcc/config/loongarch/lasx.md
index 071a5cb1733..8afd0ffd7c5 100644
--- a/gcc/config/loongarch/lasx.md
+++ b/gcc/config/loongarch/lasx.md
@@ -37,16 +37,12 @@ (define_c_enum "unspec" [
    UNSPEC_LASX_XVFCVTH
    UNSPEC_LASX_XVFCVTL
    UNSPEC_LASX_XVFLOGB
-  UNSPEC_LASX_XVFRECIP
    UNSPEC_LASX_XVFRECIPE
-  UNSPEC_LASX_XVFRINT
    UNSPEC_LASX_XVFRSQRT
    UNSPEC_LASX_XVFRSQRTE
    UNSPEC_LASX_XVFTINT_U
-  UNSPEC_LASX_XVCLO
    UNSPEC_LASX_XVSAT_S
    UNSPEC_LASX_XVSAT_U
-  UNSPEC_LASX_XVREPLVE0
    UNSPEC_LASX_XVREPL128VEI
    UNSPEC_LASX_XVSRAR
    UNSPEC_LASX_XVSRARI
@@ -57,7 +53,6 @@ (define_c_enum "unspec" [
    UNSPEC_LASX_BRANCH
    UNSPEC_LASX_BRANCH_V
- UNSPEC_LASX_MXVEXTW_U
    UNSPEC_LASX_XVSLLWIL_S
    UNSPEC_LASX_XVSLLWIL_U
    UNSPEC_LASX_XVSRAN
@@ -130,7 +125,6 @@ (define_c_enum "unspec" [
    UNSPEC_LASX_XVADD_Q
    UNSPEC_LASX_XVSUB_Q
    UNSPEC_LASX_XVREPLVE
-  UNSPEC_LASX_XVSHUF4
    UNSPEC_LASX_XVMSKGEZ
    UNSPEC_LASX_XVMSKNZ
    UNSPEC_LASX_XVEXTH_Q_D
@@ -212,11 +206,6 @@ (define_mode_attr VHMODE256
     (V8SI "V4SI")
     (V4DI "V2DI")])
-;;attribute gives half float modes for vector modes.
-(define_mode_attr VFHMODE256
-   [(V8SF "V4SF")
-   (V4DF "V2DF")])
-
  ;; The attribute gives half int/float modes for vector modes.
  (define_mode_attr VHMODE256_ALL
    [(V32QI "V16QI")
@@ -252,20 +241,6 @@ (define_mode_attr VEMODE256
     (V4DF "V8DF")
     (V4DI "V8DI")])
-;; This attribute gives the mode of the result for "copy_s_b, copy_u_b" etc.
-(define_mode_attr VRES256
-  [(V4DF "DF")
-   (V8SF "SF")
-   (V4DI "DI")
-   (V8SI "SI")
-   (V16HI "SI")
-   (V32QI "SI")])
-
-;; Only used with LASX_D iterator.
-(define_mode_attr lasx_d
-  [(V4DI "reg_or_0")
-   (V4DF "register")])
-
  ;; This attribute gives the 256 bit integer vector mode with same size.
  (define_mode_attr mode256_i
    [(V4DF "v4di")
@@ -275,14 +250,6 @@ (define_mode_attr mode256_i
     (V16HI "v16hi")
     (V32QI "v32qi")])
-
-;; This attribute gives the 256 bit float vector mode with same size.
-(define_mode_attr mode256_f
-  [(V4DF "v4df")
-   (V8SF "v8sf")
-   (V4DI "v4df")
-   (V8SI "v8sf")])
-
  ;; This attribute gives V32QI mode and V16HI mode with half size.
  (define_mode_attr mode256_i_half
    [(V32QI "v16qi")
@@ -344,14 +311,6 @@ (define_mode_attr lasxfmt_f
     (V16HI "h")
     (V32QI "b")])
-(define_mode_attr flasxfmt_f
-  [(V4DF "d_f")
-   (V8SF "s_f")
-   (V4DI "d")
-   (V8SI "w")
-   (V16HI "h")
-   (V32QI "b")])
-
  ;; This attribute gives define_insn suffix for LASX instructions that need
  ;; distinction between integer and floating point.
  (define_mode_attr lasxfmt_f_wd
@@ -438,27 +397,6 @@ (define_mode_attr bitimm256
     (V4DI  "uimm6")])
-(define_mode_attr d2lasxfmt
-  [(V8SI "q")
-   (V16HI "d")
-   (V32QI "w")])
-
-(define_mode_attr d2lasxfmt_u
-  [(V8SI "qu")
-   (V16HI "du")
-   (V32QI "wu")])
-
-(define_mode_attr VD2MODE256
-  [(V8SI "V4DI")
-   (V16HI "V4DI")
-   (V32QI "V8SI")])
-
-(define_mode_attr lasxfmt_wd
-  [(V4DI "d")
-   (V8SI "w")
-   (V16HI "w")
-   (V32QI "w")])
-
  ;; Half modes of all LASX vector modes, in lower-case.
  (define_mode_attr lasxhalf [(V32QI "v16qi")  (V16HI "v8hi")
               (V8SI "v4si")  (V4DI  "v2di")
@@ -1402,10 +1340,6 @@ (define_insn "floatuns<fint256><FLASX:mode>2"
     (set_attr "cnv_mode" "<FINTCNV256>")
     (set_attr "mode" "<MODE>")])
-(define_mode_attr FFQ256
-  [(V4SF "V16HI")
-   (V2DF "V8SI")])
-
  (define_insn "lasx_xvreplgr2vr_<lasxfmt_f>"
    [(set (match_operand:ILASX 0 "register_operand" "=f,f")
        (vec_duplicate:ILASX
diff --git a/gcc/config/loongarch/lsx.md b/gcc/config/loongarch/lsx.md
index 878ff11e1ac..6c92e69d235 100644
--- a/gcc/config/loongarch/lsx.md
+++ b/gcc/config/loongarch/lsx.md
@@ -39,15 +39,12 @@ (define_c_enum "unspec" [
    UNSPEC_LSX_VFCVTH
    UNSPEC_LSX_VFCVTL
    UNSPEC_LSX_VFLOGB
-  UNSPEC_LSX_VFRECIP
    UNSPEC_LSX_VFRECIPE
-  UNSPEC_LSX_VFRINT
    UNSPEC_LSX_VFRSQRT
    UNSPEC_LSX_VFRSQRTE
    UNSPEC_LSX_VFTINT_U
    UNSPEC_LSX_VSAT_S
    UNSPEC_LSX_VSAT_U
-  UNSPEC_LSX_VREPLVEI
    UNSPEC_LSX_VSRAR
    UNSPEC_LSX_VSRARI
    UNSPEC_LSX_VSRLR
@@ -167,22 +164,6 @@ (define_mode_attr dlsxfmt_u
     (V8HI "wu")
     (V16QI "hu")])
-(define_mode_attr d2lsxfmt
-  [(V4SI "q")
-   (V8HI "d")
-   (V16QI "w")])
-
-(define_mode_attr d2lsxfmt_u
-  [(V4SI "qu")
-   (V8HI "du")
-   (V16QI "wu")])
-
-;; The attribute gives two double modes for vector modes.
-(define_mode_attr VD2MODE
-  [(V4SI "V2DI")
-   (V8HI "V2DI")
-   (V16QI "V4SI")])
-
  ;; Only used for vilvh and splitting insert_d and copy_{u,s}.d.
  (define_mode_iterator LSX_D    [V2DI V2DF])
@@ -299,24 +280,12 @@ (define_mode_attr lsxfmt_f
     (V8HI "h")
     (V16QI "b")])
-(define_mode_attr flsxfmt_f
-  [(V2DF "d_f")
-   (V4SF "s_f")
-   (V2DI "d")
-   (V4SI "w")
-   (V8HI "h")
-   (V16QI "b")])
-
  (define_mode_attr flsxfmt
    [(V2DF "d")
     (V4SF "s")
     (V2DI "d")
     (V4SI "s")])
-(define_mode_attr flsxfrint
-  [(V2DF "d")
-   (V4SF "s")])
-
  (define_mode_attr ilsxfmt
    [(V2DF "l")
     (V4SF "w")])
@@ -1275,10 +1244,6 @@ (define_insn "floatuns<fint><FLSX:mode>2"
     (set_attr "cnv_mode" "<FINTCNV>")
     (set_attr "mode" "<MODE>")])
-(define_mode_attr FFQ
-  [(V4SF "V8HI")
-   (V2DF "V4SI")])
-
  (define_insn "lsx_vreplgr2vr_<lsxfmt_f>"
    [(set (match_operand:ILSX 0 "register_operand" "=f,f")
        (vec_duplicate:ILSX

Reply via email to