[AArch64 array_mode 3/8] Stop using EImode in aarch64-simd.md and iterators.md
authorAlan Lawrence <alan.lawrence@arm.com>
Tue, 15 Sep 2015 12:28:20 +0000 (12:28 +0000)
committerAlan Lawrence <alalaw01@gcc.gnu.org>
Tue, 15 Sep 2015 12:28:20 +0000 (12:28 +0000)
* config/aarch64/aarch64-simd.md (aarch64_simd_ld3r<mode>):
Change operand mode from <V_THREE_ELEM> to BLK.
(aarch64_vec_load_lanesci_lane<mode>): Likewise.
(aarch64_vec_store_lanesci_lane<mode>): Likewise.
(aarch64_ld3r<mode>): Generate MEM rtx with BLKmode, call set_mem_size.
(aarch64_ld3_lane<mode>): Likewise.
(aarch64_st3_lane<mode>): Likewise.
* config/aarch64/iterators.md (V_THREE_ELEM): Remove.

From-SVN: r227783

gcc/ChangeLog
gcc/config/aarch64/aarch64-simd.md
gcc/config/aarch64/iterators.md

index affc5bac428166cd817501a7fb19c60d20854c1e..44373e1b255755a194dea0041969b02c5f3407d6 100644 (file)
@@ -1,3 +1,14 @@
+2015-09-08  Alan Lawrence  <alan.lawrence@arm.com>
+
+       * config/aarch64/aarch64-simd.md (aarch64_simd_ld3r<mode>):
+       Change operand mode from <V_THREE_ELEM> to BLK.
+       (aarch64_vec_load_lanesci_lane<mode>): Likewise.
+       (aarch64_vec_store_lanesci_lane<mode>): Likewise.
+       (aarch64_ld3r<mode>): Generate MEM rtx with BLKmode, call set_mem_size.
+       (aarch64_ld3_lane<mode>): Likewise.
+       (aarch64_st3_lane<mode>): Likewise.
+       * config/aarch64/iterators.md (V_THREE_ELEM): Remove.
+
 2015-09-15  Alan Lawrence  <alan.lawrence@arm.com>
 
        * config/aarch64/aarch64-simd.md
index 20b9be9fd155fe144ece5c90691da6a34898d5cc..c1048d373c535dd542dfdefafb94885cc1bda0c4 100644 (file)
 
 (define_insn "aarch64_simd_ld3r<mode>"
   [(set (match_operand:CI 0 "register_operand" "=w")
-       (unspec:CI [(match_operand:<V_THREE_ELEM> 1 "aarch64_simd_struct_operand" "Utv")
+       (unspec:CI [(match_operand:BLK 1 "aarch64_simd_struct_operand" "Utv")
                    (unspec:VALLDIF [(const_int 0)] UNSPEC_VSTRUCTDUMMY) ]
                   UNSPEC_LD3_DUP))]
   "TARGET_SIMD"
 
 (define_insn "aarch64_vec_load_lanesci_lane<mode>"
   [(set (match_operand:CI 0 "register_operand" "=w")
-       (unspec:CI [(match_operand:<V_THREE_ELEM> 1 "aarch64_simd_struct_operand" "Utv")
+       (unspec:CI [(match_operand:BLK 1 "aarch64_simd_struct_operand" "Utv")
                    (match_operand:CI 2 "register_operand" "0")
                    (match_operand:SI 3 "immediate_operand" "i")
                    (unspec:VALLDIF [(const_int 0)] UNSPEC_VSTRUCTDUMMY)]
 
 ;; RTL uses GCC vector extension indices, so flip only for assembly.
 (define_insn "aarch64_vec_store_lanesci_lane<mode>"
-  [(set (match_operand:<V_THREE_ELEM> 0 "aarch64_simd_struct_operand" "=Utv")
-       (unspec:<V_THREE_ELEM> [(match_operand:CI 1 "register_operand" "w")
-                   (unspec:VALLDIF [(const_int 0)] UNSPEC_VSTRUCTDUMMY)
-                   (match_operand:SI 2 "immediate_operand" "i")]
-                  UNSPEC_ST3_LANE))]
+  [(set (match_operand:BLK 0 "aarch64_simd_struct_operand" "=Utv")
+       (unspec:BLK [(match_operand:CI 1 "register_operand" "w")
+                    (unspec:VALLDIF [(const_int 0)] UNSPEC_VSTRUCTDUMMY)
+                    (match_operand:SI 2 "immediate_operand" "i")]
+                   UNSPEC_ST3_LANE))]
   "TARGET_SIMD"
   {
     operands[2] = GEN_INT (ENDIAN_LANE_N (<MODE>mode, INTVAL (operands[2])));
    (unspec:VALLDIF [(const_int 0)] UNSPEC_VSTRUCTDUMMY)]
   "TARGET_SIMD"
 {
-  machine_mode mode = <V_THREE_ELEM>mode;
-  rtx mem = gen_rtx_MEM (mode, operands[1]);
+  rtx mem = gen_rtx_MEM (BLKmode, operands[1]);
+  set_mem_size (mem, GET_MODE_SIZE (GET_MODE_INNER (<MODE>mode)) * 3);
 
   emit_insn (gen_aarch64_simd_ld3r<mode> (operands[0], mem));
   DONE;
        (unspec:VALLDIF [(const_int 0)] UNSPEC_VSTRUCTDUMMY)]
   "TARGET_SIMD"
 {
-  machine_mode mode = <V_THREE_ELEM>mode;
-  rtx mem = gen_rtx_MEM (mode, operands[1]);
+  rtx mem = gen_rtx_MEM (BLKmode, operands[1]);
+  set_mem_size (mem, GET_MODE_SIZE (GET_MODE_INNER (<MODE>mode)) * 3);
 
   emit_insn (gen_aarch64_vec_load_lanesci_lane<mode> (operands[0],
                                                      mem,
   (match_operand:SI 2 "immediate_operand")]
   "TARGET_SIMD"
 {
-  machine_mode mode = <V_THREE_ELEM>mode;
-  rtx mem = gen_rtx_MEM (mode, operands[0]);
+  rtx mem = gen_rtx_MEM (BLKmode, operands[0]);
+  set_mem_size (mem, GET_MODE_SIZE (GET_MODE_INNER (<MODE>mode)) * 3);
 
   emit_insn (gen_aarch64_vec_store_lanesci_lane<mode> (mem,
                                                       operands[1],
index e311b88c3f8538cd648a40c718e04a3d64bfb9e6..ca0d299d39d803c951287008beb5a78adb8b0914 100644 (file)
                               (V4HF "SF") (V8HF "SF")
                               (DF "V2DI")   (V2DF "V2DI")])
 
-;; Similar, for three elements.
-(define_mode_attr V_THREE_ELEM [(V8QI "BLK") (V16QI "BLK")
-                                (V4HI "BLK") (V8HI "BLK")
-                                (V2SI "BLK") (V4SI "BLK")
-                                (DI "EI")    (V2DI "EI")
-                                (V2SF "BLK") (V4SF "BLK")
-                                (V4HF "BLK") (V8HF "BLK")
-                                (DF "EI")    (V2DF "EI")])
-
 ;; Similar, for four elements.
 (define_mode_attr V_FOUR_ELEM [(V8QI "SI")   (V16QI "SI")
                                (V4HI "V4HI") (V8HI "V4HI")