[ARM,AARCH64] Insn type reclassification. Split f_cvt type.
authorJames Greenhalgh <james.greenhalgh@arm.com>
Fri, 6 Sep 2013 13:37:56 +0000 (13:37 +0000)
committerJames Greenhalgh <jgreenhalgh@gcc.gnu.org>
Fri, 6 Sep 2013 13:37:56 +0000 (13:37 +0000)
gcc/
* config/arm/types.md
(type): Split f_cvt as f_cvt, f_cvtf2i, f_cvti2f.
* config/aarch64/aarch64.md
(l<fcvt_pattern><su_optab><GPF:mode><GPI:mode>2): Update with
new attributes.
(fix_trunc<GPF:mode><GPI:mode>2): Likewise.
(fixuns_trunc<GPF:mode><GPI:mode>2): Likewise.
(float<GPI:mode><GPF:mode>2): Likewise.
* config/arm/vfp.md
(*truncsisf2_vfp): Update with new attributes.
(*truncsidf2_vfp): Likewise.
(fixuns_truncsfsi2): Likewise.
(fixuns_truncdfsi2): Likewise.
(*floatsisf2_vfp): Likewise.
(*floatsidf2_vfp): Likewise.
(floatunssisf2): Likewise.
(floatunssidf2): Likewise.
(*combine_vcvt_f32_<FCVTI32typename>): Likewise.
(*combine_vcvt_f64_<FCVTI32typename>): Likewise.
* config/arm/arm1020e.md: Update with new attributes.
* config/arm/cortex-a15-neon.md: Update with new attributes.
* config/arm/cortex-a5.md: Update with new attributes.
* config/arm/cortex-a53.md: Update with new attributes.
* config/arm/cortex-a7.md: Update with new attributes.
* config/arm/cortex-a8-neon.md: Update with new attributes.
* config/arm/cortex-a9.md: Update with new attributes.
* config/arm/cortex-m4-fpu.md: Update with new attributes.
* config/arm/cortex-r4f.md: Update with new attributes.
* config/arm/marvell-pj4.md: Update with new attributes.
* config/arm/vfp11.md: Update with new attributes.

From-SVN: r202328

15 files changed:
gcc/ChangeLog
gcc/config/aarch64/aarch64.md
gcc/config/arm/arm1020e.md
gcc/config/arm/cortex-a15-neon.md
gcc/config/arm/cortex-a5.md
gcc/config/arm/cortex-a53.md
gcc/config/arm/cortex-a7.md
gcc/config/arm/cortex-a8-neon.md
gcc/config/arm/cortex-a9.md
gcc/config/arm/cortex-m4-fpu.md
gcc/config/arm/cortex-r4f.md
gcc/config/arm/marvell-pj4.md
gcc/config/arm/types.md
gcc/config/arm/vfp.md
gcc/config/arm/vfp11.md

index 4c33190ec03d1dc3e375c7b93f8e608182e48fbe..d70d0e4e5b8971193ca743c3569991b56abdf267 100644 (file)
@@ -1,3 +1,36 @@
+2013-09-06  James Greenhalgh  <james.greenhalgh@arm.com>
+
+       * config/arm/types.md
+       (type): Split f_cvt as f_cvt, f_cvtf2i, f_cvti2f.
+       * config/aarch64/aarch64.md
+       (l<fcvt_pattern><su_optab><GPF:mode><GPI:mode>2): Update with
+       new attributes.
+       (fix_trunc<GPF:mode><GPI:mode>2): Likewise.
+       (fixuns_trunc<GPF:mode><GPI:mode>2): Likewise.
+       (float<GPI:mode><GPF:mode>2): Likewise.
+       * config/arm/vfp.md
+       (*truncsisf2_vfp): Update with new attributes.
+       (*truncsidf2_vfp): Likewise.
+       (fixuns_truncsfsi2): Likewise.
+       (fixuns_truncdfsi2): Likewise.
+       (*floatsisf2_vfp): Likewise.
+       (*floatsidf2_vfp): Likewise.
+       (floatunssisf2): Likewise.
+       (floatunssidf2): Likewise.
+       (*combine_vcvt_f32_<FCVTI32typename>): Likewise.
+       (*combine_vcvt_f64_<FCVTI32typename>): Likewise.
+       * config/arm/arm1020e.md: Update with new attributes.
+       * config/arm/cortex-a15-neon.md: Update with new attributes.
+       * config/arm/cortex-a5.md: Update with new attributes.
+       * config/arm/cortex-a53.md: Update with new attributes.
+       * config/arm/cortex-a7.md: Update with new attributes.
+       * config/arm/cortex-a8-neon.md: Update with new attributes.
+       * config/arm/cortex-a9.md: Update with new attributes.
+       * config/arm/cortex-m4-fpu.md: Update with new attributes.
+       * config/arm/cortex-r4f.md: Update with new attributes.
+       * config/arm/marvell-pj4.md: Update with new attributes.
+       * config/arm/vfp11.md: Update with new attributes.
+
 2013-09-06  James Greenhalgh  <james.greenhalgh@arm.com>
 
        * config/aarch64/arm_neon.h
index 4dfd2ab83d00601dc8192ad47fec2c1e404d1264..6a4a975bb89c48311659db0091c76266d29cdba2 100644 (file)
   "TARGET_FLOAT"
   "fcvt<frint_suffix><su>\\t%<GPI:w>0, %<GPF:s>1"
   [(set_attr "v8type" "fcvtf2i")
-   (set_attr "type" "f_cvt")
+   (set_attr "type" "f_cvtf2i")
    (set_attr "mode" "<GPF:MODE>")
    (set_attr "mode2" "<GPI:MODE>")]
 )
   "TARGET_FLOAT"
   "fcvtzs\\t%<GPI:w>0, %<GPF:s>1"
   [(set_attr "v8type" "fcvtf2i")
-   (set_attr "type" "f_cvt")
+   (set_attr "type" "f_cvtf2i")
    (set_attr "mode" "<GPF:MODE>")
    (set_attr "mode2" "<GPI:MODE>")]
 )
   "TARGET_FLOAT"
   "fcvtzu\\t%<GPI:w>0, %<GPF:s>1"
   [(set_attr "v8type" "fcvtf2i")
-   (set_attr "type" "f_cvt")
+   (set_attr "type" "f_cvtf2i")
    (set_attr "mode" "<GPF:MODE>")
    (set_attr "mode2" "<GPI:MODE>")]
 )
   "TARGET_FLOAT"
   "scvtf\\t%<GPF:s>0, %<GPI:w>1"
   [(set_attr "v8type" "fcvti2f")
-   (set_attr "type" "f_cvt")
+   (set_attr "type" "f_cvti2f")
    (set_attr "mode" "<GPF:MODE>")
    (set_attr "mode2" "<GPI:MODE>")]
 )
index 615c6a5b16de647cbd8c0fa947f8b763a1353ee3..e16e862c1f49b36f75ba1faf20c2095fb9aeacdf 100644 (file)
 
 (define_insn_reservation "v10_cvt" 5
  (and (eq_attr "vfp10" "yes")
-      (eq_attr "type" "f_cvt"))
+      (eq_attr "type" "f_cvt,f_cvti2f,f_cvtf2i"))
  "1020a_e+v10_fmac")
 
 (define_insn_reservation "v10_fmul" 6
index f1cac9e1af88bd5e3f0d87ff50c44376ad82d441..b5d14e7f7f9c3965e02e0d6e0edf0044df341812 100644 (file)
 
 (define_insn_reservation "cortex_a15_vfp_cvt" 6
   (and (eq_attr "tune" "cortexa15")
-       (eq_attr "type" "f_cvt"))
+       (eq_attr "type" "f_cvt,f_cvtf2i,f_cvti2f"))
   "ca15_issue1,ca15_cx_vfp")
 
 (define_insn_reservation "cortex_a15_vfp_cmpd" 8
index 8930baf8daff5be2d2872324cd41fd5a1cd03778..54c8c420324a155523bc961917c475c5aeb86a96 100644 (file)
 
 (define_insn_reservation "cortex_a5_fpalu" 4
   (and (eq_attr "tune" "cortexa5")
-       (eq_attr "type" "ffariths, fadds, ffarithd, faddd, fcpys, fmuls, f_cvt,\
+       (eq_attr "type" "ffariths, fadds, ffarithd, faddd, fcpys, fmuls,\
+                        f_cvt,f_cvtf2i,f_cvti2f,\
                        fcmps, fcmpd"))
   "cortex_a5_ex1+cortex_a5_fpadd_pipe")
 
index 66d4cb436f5fb43b545f94ac57a8c5e909360353..e84b9ea1a71ef1df2476d3b25900522469074914 100644 (file)
 
 (define_insn_reservation "cortex_a53_fpalu" 4
   (and (eq_attr "tune" "cortexa53")
-       (eq_attr "type" "ffariths, fadds, ffarithd, faddd, fcpys, fmuls, f_cvt,\
+       (eq_attr "type" "ffariths, fadds, ffarithd, faddd, fcpys, fmuls,\
+                        f_cvt,f_cvtf2i,f_cvti2f,\
                        fcmps, fcmpd, fcsel"))
   "cortex_a53_slot0+cortex_a53_fpadd_pipe")
 
index bd7aecda021ef50209cd6d94758626fa015a123f..6d7b43685a3afe8f89e7b1d9f336326f511fea7b 100644 (file)
 (define_insn_reservation "cortex_a7_fpalu" 4
   (and (eq_attr "tune" "cortexa7")
        (eq_attr "type" "ffariths, fadds, ffarithd, faddd, fcpys,\
-                        f_cvt, fcmps, fcmpd"))
+                        f_cvt, f_cvtf2i, f_cvti2f, fcmps, fcmpd"))
   "cortex_a7_ex1+cortex_a7_fpadd_pipe")
 
 ;; For fconsts and fconstd, 8-bit immediate data is passed directly from
index 57a81142a18f0c4381c13fecab07da49290b3fad..6953a9590a5c486bf4817ff2521caa299c8ecf93 100644 (file)
 
 (define_insn_reservation "cortex_a8_vfp_cvt" 7
   (and (eq_attr "tune" "cortexa8")
-       (eq_attr "type" "f_cvt"))
+       (eq_attr "type" "f_cvt,f_cvtf2i,f_cvti2f"))
   "cortex_a8_vfp,cortex_a8_vfplite*6")
 
 ;; NEON -> core transfers.
index 4703bf36b2f8ad6a68363211f4708393924ed8a0..a66481807cf4c9263d0b565b370d6057d21a043e 100644 (file)
@@ -233,7 +233,7 @@ cortex_a9_store3_4, cortex_a9_store1_2,  cortex_a9_load3_4")
 
 (define_insn_reservation "cortex_a9_fadd" 4
   (and (eq_attr "tune" "cortexa9")
-       (eq_attr "type" "fadds, faddd, f_cvt"))
+       (eq_attr "type" "fadds, faddd, f_cvt, f_cvtf2i, f_cvti2f"))
   "ca9fp_add")
 
 (define_insn_reservation "cortex_a9_fcmp" 1
index f148e9dba798177a105df6a36e188d3dff7b890e..81c12b74f65cf6fe113b77cb4368af5383916c44 100644 (file)
@@ -77,7 +77,7 @@
 
 (define_insn_reservation "cortex_m4_f_cvt" 2
   (and (eq_attr "tune" "cortexm4")
-       (eq_attr "type" "f_cvt"))
+       (eq_attr "type" "f_cvt,f_cvtf2i,f_cvti2f"))
   "cortex_m4_ex_v")
 
 (define_insn_reservation "cortex_m4_f_load" 2
index 8262ccd5b659a64c2dcf7b02e277188657c5164e..06e061e2b1451afcd7207186a2875cc2da3c771c 100644 (file)
 
 (define_insn_reservation "cortex_r4_f_cvt" 8
  (and (eq_attr "tune_cortexr4" "yes")
-      (eq_attr "type" "f_cvt"))
+      (eq_attr "type" "f_cvt,f_cvtf2i,f_cvti2f"))
  "cortex_r4_single_issue*3")
 
 (define_insn_reservation "cortex_r4_f_memd" 8
index f6e4e011c338a898ed7b0b4706966755f24bd6ac..d9cf8d4b6b57967be185bcb5f9be0b4f6e2faf9a 100644 (file)
 (define_insn_reservation "pj4_vfp_cpy"  4
   (and (eq_attr "tune" "marvell_pj4")
        (eq_attr "type" "fcpys,ffariths,ffarithd,fconsts,fconstd,\
-                        fcmps,fcmpd,f_cvt"))  "pj4_is,nothing*2,vissue,vfast,nothing*2")
+                        fcmps,fcmpd,f_cvt,f_cvtf2i,f_cvti2f"))
+"pj4_is,nothing*2,vissue,vfast,nothing*2")
 
 ;; Enlarge latency, and wish that more nondependent insns are
 ;; scheduled immediately after VFP load.
index ed2522b0cfef29e21c2bd9037962482ff2065f17..de817634ec98c4c568ade6d1e3d5a8910d886075 100644 (file)
@@ -55,7 +55,9 @@
 ; clz                count leading zeros (CLZ).
 ; csel               From ARMv8-A: conditional select.
 ; extend             extend instruction (SXTB, SXTH, UXTB, UXTH).
-; f_cvt              conversion between float and integral.
+; f_cvt              conversion between float representations.
+; f_cvtf2i           conversion between float and integral types.
+; f_cvti2f           conversion between integral and float types.
 ; f_flag             transfer of co-processor flags to the CPSR.
 ; f_load[d,s]        double/single load from memory.  Used for VFP unit.
 ; f_mcr              transfer arm to vfp reg.
   csel,\
   extend,\
   f_cvt,\
+  f_cvtf2i,\
+  f_cvti2f,\
   f_flag,\
   f_loadd,\
   f_loads,\
index 419a78984b8200f61c7ad4a88e15f5faa4078620..0e61c6eff004cf764d4fd801a508049f18a1e09f 100644 (file)
   "ftosizs%?\\t%0, %1"
   [(set_attr "predicable" "yes")
    (set_attr "predicable_short_it" "no")
-   (set_attr "type" "f_cvt")]
+   (set_attr "type" "f_cvtf2i")]
 )
 
 (define_insn "*truncsidf2_vfp"
   "ftosizd%?\\t%0, %P1"
   [(set_attr "predicable" "yes")
    (set_attr "predicable_short_it" "no")
-   (set_attr "type" "f_cvt")]
+   (set_attr "type" "f_cvtf2i")]
 )
 
 
   "ftouizs%?\\t%0, %1"
   [(set_attr "predicable" "yes")
    (set_attr "predicable_short_it" "no")
-   (set_attr "type" "f_cvt")]
+   (set_attr "type" "f_cvtf2i")]
 )
 
 (define_insn "fixuns_truncdfsi2"
   "ftouizd%?\\t%0, %P1"
   [(set_attr "predicable" "yes")
    (set_attr "predicable_short_it" "no")
-   (set_attr "type" "f_cvt")]
+   (set_attr "type" "f_cvtf2i")]
 )
 
 
   "fsitos%?\\t%0, %1"
   [(set_attr "predicable" "yes")
    (set_attr "predicable_short_it" "no")
-   (set_attr "type" "f_cvt")]
+   (set_attr "type" "f_cvti2f")]
 )
 
 (define_insn "*floatsidf2_vfp"
   "fsitod%?\\t%P0, %1"
   [(set_attr "predicable" "yes")
    (set_attr "predicable_short_it" "no")
-   (set_attr "type" "f_cvt")]
+   (set_attr "type" "f_cvti2f")]
 )
 
 
   "fuitos%?\\t%0, %1"
   [(set_attr "predicable" "yes")
    (set_attr "predicable_short_it" "no")
-   (set_attr "type" "f_cvt")]
+   (set_attr "type" "f_cvti2f")]
 )
 
 (define_insn "floatunssidf2"
   "fuitod%?\\t%P0, %1"
   [(set_attr "predicable" "yes")
    (set_attr "predicable_short_it" "no")
-   (set_attr "type" "f_cvt")]
+   (set_attr "type" "f_cvti2f")]
 )
 
 
   "TARGET_32BIT && TARGET_HARD_FLOAT && TARGET_VFP3 && !flag_rounding_math"
   "vcvt.f32.<FCVTI32typename>\\t%0, %1, %v2"
  [(set_attr "predicable" "no")
-  (set_attr "type" "f_cvt")]
+  (set_attr "type" "f_cvti2f")]
 )
 
 ;; Not the ideal way of implementing this. Ideally we would be able to split
   vmov.f32\\t%0, %1\;vcvt.f64.<FCVTI32typename>\\t%P0, %P0, %v2
   vmov.f64\\t%P0, %1, %1\;vcvt.f64.<FCVTI32typename>\\t%P0, %P0, %v2"
  [(set_attr "predicable" "no")
-  (set_attr "type" "f_cvt")
+  (set_attr "type" "f_cvti2f")
   (set_attr "length" "8")]
 )
 
index 9e6ba849a718c7577006d9aad545fd26b0392107..3cc343e0186d3d64b4f43360a5d94c0429706efa 100644 (file)
@@ -56,7 +56,8 @@
 
 (define_insn_reservation "vfp_farith" 8
  (and (eq_attr "generic_vfp" "yes")
-      (eq_attr "type" "fadds,faddd,fconsts,fconstd,f_cvt,fmuls,fmacs,ffmas"))
+      (eq_attr "type" "fadds,faddd,fconsts,fconstd,f_cvt,f_cvtf2i,f_cvti2f,\
+                       fmuls,fmacs,ffmas"))
  "fmac")
 
 (define_insn_reservation "vfp_fmul" 9