[AArch64] Avoid GET_MODE_NUNITS in v8.4 support
authorRichard Sandiford <richard.sandiford@linaro.org>
Thu, 11 Jan 2018 13:07:17 +0000 (13:07 +0000)
committerRichard Sandiford <rsandifo@gcc.gnu.org>
Thu, 11 Jan 2018 13:07:17 +0000 (13:07 +0000)
This patch replaces GET_MODE_NUNITS in some of the v8.4 support
with equivalent values, in preparation for the switch to
NUM_POLY_INT_COEFFS==2.

2018-01-11  Richard Sandiford  <richard.sandiford@linaro.org>

gcc/
* config/aarch64/aarch64-simd.md
(aarch64_fml<f16mac1>l<f16quad>_low<mode>): Avoid GET_MODE_NUNITS.
(aarch64_fml<f16mac1>l<f16quad>_high<mode>): Likewise.
(aarch64_fml<f16mac1>l_lane_lowv2sf): Likewise.
(aarch64_fml<f16mac1>l_lane_highv2sf): Likewise.
(aarch64_fml<f16mac1>lq_laneq_lowv4sf): Likewise.
(aarch64_fml<f16mac1>lq_laneq_highv4sf): Likewise.
(aarch64_fml<f16mac1>l_laneq_lowv2sf): Likewise.
(aarch64_fml<f16mac1>l_laneq_highv2sf): Likewise.
(aarch64_fml<f16mac1>lq_lane_lowv4sf): Likewise.
(aarch64_fml<f16mac1>lq_lane_highv4sf): Likewise.

From-SVN: r256530

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

index 7ff69030e1ad989bf2973cc049b10de82e63de30..8654289e58b8072fd003f54e9054f6449bc4c24a 100644 (file)
@@ -1,3 +1,17 @@
+2018-01-11  Richard Sandiford  <richard.sandiford@linaro.org>
+
+       * config/aarch64/aarch64-simd.md
+       (aarch64_fml<f16mac1>l<f16quad>_low<mode>): Avoid GET_MODE_NUNITS.
+       (aarch64_fml<f16mac1>l<f16quad>_high<mode>): Likewise.
+       (aarch64_fml<f16mac1>l_lane_lowv2sf): Likewise.
+       (aarch64_fml<f16mac1>l_lane_highv2sf): Likewise.
+       (aarch64_fml<f16mac1>lq_laneq_lowv4sf): Likewise.
+       (aarch64_fml<f16mac1>lq_laneq_highv4sf): Likewise.
+       (aarch64_fml<f16mac1>l_laneq_lowv2sf): Likewise.
+       (aarch64_fml<f16mac1>l_laneq_highv2sf): Likewise.
+       (aarch64_fml<f16mac1>lq_lane_lowv4sf): Likewise.
+       (aarch64_fml<f16mac1>lq_lane_highv4sf): Likewise.
+
 2018-01-11  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
 
        PR target/83514
index 5b3db91051237e6b321c7eb7e1643f77d1eb60be..792fa1ce47841f5853f4c631a070f799fe35a487 100644 (file)
         VFMLA16_LOW))]
   "TARGET_F16FML"
 {
-  int nunits = GET_MODE_NUNITS (<VFMLA_W>mode);
-  rtx p1 = aarch64_simd_vect_par_cnst_half (<VFMLA_W>mode, nunits, false);
-  rtx p2 = aarch64_simd_vect_par_cnst_half (<VFMLA_W>mode, nunits, false);
+  rtx p1 = aarch64_simd_vect_par_cnst_half (<VFMLA_W>mode,
+                                           <nunits> * 2, false);
+  rtx p2 = aarch64_simd_vect_par_cnst_half (<VFMLA_W>mode,
+                                           <nunits> * 2, false);
 
   emit_insn (gen_aarch64_simd_fml<f16mac1>l<f16quad>_low<mode> (operands[0],
                                                                operands[1],
         VFMLA16_HIGH))]
   "TARGET_F16FML"
 {
-  int nunits = GET_MODE_NUNITS (<VFMLA_W>mode);
-  rtx p1 = aarch64_simd_vect_par_cnst_half (<VFMLA_W>mode, nunits, true);
-  rtx p2 = aarch64_simd_vect_par_cnst_half (<VFMLA_W>mode, nunits, true);
+  rtx p1 = aarch64_simd_vect_par_cnst_half (<VFMLA_W>mode, <nunits> * 2, true);
+  rtx p2 = aarch64_simd_vect_par_cnst_half (<VFMLA_W>mode, <nunits> * 2, true);
 
   emit_insn (gen_aarch64_simd_fml<f16mac1>l<f16quad>_high<mode> (operands[0],
                                                                 operands[1],
         VFMLA16_LOW))]
   "TARGET_F16FML"
 {
-    rtx p1 = aarch64_simd_vect_par_cnst_half (V4HFmode,
-                                             GET_MODE_NUNITS (V4HFmode),
-                                             false);
+    rtx p1 = aarch64_simd_vect_par_cnst_half (V4HFmode, 4, false);
     rtx lane = aarch64_endian_lane_rtx (V4HFmode, INTVAL (operands[4]));
 
     emit_insn (gen_aarch64_simd_fml<f16mac1>l_lane_lowv2sf (operands[0],
         VFMLA16_HIGH))]
   "TARGET_F16FML"
 {
-    rtx p1 = aarch64_simd_vect_par_cnst_half (V4HFmode,
-                                             GET_MODE_NUNITS (V4HFmode),
-                                             true);
+    rtx p1 = aarch64_simd_vect_par_cnst_half (V4HFmode, 4, true);
     rtx lane = aarch64_endian_lane_rtx (V4HFmode, INTVAL (operands[4]));
 
     emit_insn (gen_aarch64_simd_fml<f16mac1>l_lane_highv2sf (operands[0],
         VFMLA16_LOW))]
   "TARGET_F16FML"
 {
-    rtx p1 = aarch64_simd_vect_par_cnst_half (V8HFmode,
-                                             GET_MODE_NUNITS (V8HFmode),
-                                             false);
+    rtx p1 = aarch64_simd_vect_par_cnst_half (V8HFmode, 8, false);
     rtx lane = aarch64_endian_lane_rtx (V8HFmode, INTVAL (operands[4]));
 
     emit_insn (gen_aarch64_simd_fml<f16mac1>lq_laneq_lowv4sf (operands[0],
         VFMLA16_HIGH))]
   "TARGET_F16FML"
 {
-    rtx p1 = aarch64_simd_vect_par_cnst_half (V8HFmode,
-                                             GET_MODE_NUNITS (V8HFmode),
-                                             true);
-
+    rtx p1 = aarch64_simd_vect_par_cnst_half (V8HFmode, 8, true);
     rtx lane = aarch64_endian_lane_rtx (V8HFmode, INTVAL (operands[4]));
 
     emit_insn (gen_aarch64_simd_fml<f16mac1>lq_laneq_highv4sf (operands[0],
         VFMLA16_LOW))]
   "TARGET_F16FML"
 {
-    rtx p1 = aarch64_simd_vect_par_cnst_half (V4HFmode,
-                                             GET_MODE_NUNITS (V4HFmode),
-                                             false);
+    rtx p1 = aarch64_simd_vect_par_cnst_half (V4HFmode, 4, false);
     rtx lane = aarch64_endian_lane_rtx (V8HFmode, INTVAL (operands[4]));
 
     emit_insn (gen_aarch64_simd_fml<f16mac1>l_laneq_lowv2sf (operands[0],
         VFMLA16_HIGH))]
   "TARGET_F16FML"
 {
-    rtx p1 = aarch64_simd_vect_par_cnst_half (V4HFmode,
-                                             GET_MODE_NUNITS(V4HFmode),
-                                             true);
+    rtx p1 = aarch64_simd_vect_par_cnst_half (V4HFmode, 4, true);
     rtx lane = aarch64_endian_lane_rtx (V8HFmode, INTVAL (operands[4]));
 
     emit_insn (gen_aarch64_simd_fml<f16mac1>l_laneq_highv2sf (operands[0],
         VFMLA16_LOW))]
   "TARGET_F16FML"
 {
-    rtx p1 = aarch64_simd_vect_par_cnst_half (V8HFmode,
-                                             GET_MODE_NUNITS (V8HFmode),
-                                             false);
-
+    rtx p1 = aarch64_simd_vect_par_cnst_half (V8HFmode, 8, false);
     rtx lane = aarch64_endian_lane_rtx (V4HFmode, INTVAL (operands[4]));
 
     emit_insn (gen_aarch64_simd_fml<f16mac1>lq_lane_lowv4sf (operands[0],
         VFMLA16_HIGH))]
   "TARGET_F16FML"
 {
-    rtx p1 = aarch64_simd_vect_par_cnst_half (V8HFmode,
-                                             GET_MODE_NUNITS (V8HFmode),
-                                             true);
+    rtx p1 = aarch64_simd_vect_par_cnst_half (V8HFmode, 8, true);
     rtx lane = aarch64_endian_lane_rtx (V4HFmode, INTVAL (operands[4]));
 
     emit_insn (gen_aarch64_simd_fml<f16mac1>lq_lane_highv4sf (operands[0],