]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
rs6000: Remove "length 4" from branch insns
authorSegher Boessenkool <segher@kernel.crashing.org>
Thu, 16 Aug 2018 19:42:36 +0000 (21:42 +0200)
committerSegher Boessenkool <segher@gcc.gnu.org>
Thu, 16 Aug 2018 19:42:36 +0000 (21:42 +0200)
Now that it is the default for branch insns like for all other insns,
we don't need to set it explicitly so often anymore.

* config/rs6000/altivec.md: Don't set length attribute to the default
value, for branch instructions.
* config/rs6000/darwin.md: Ditto.
* config/rs6000/rs6000.md: Ditto.

From-SVN: r263602

gcc/ChangeLog
gcc/config/rs6000/altivec.md
gcc/config/rs6000/darwin.md
gcc/config/rs6000/rs6000.md

index 02a20b5b7c8ae0d162452b4d544b7454bf6ffbd8..19f675d307111751c83a604d03f348835bd3a8af 100644 (file)
@@ -1,3 +1,10 @@
+2018-08-16  Segher Boessenkool  <segher@kernel.crashing.org>
+
+       * config/rs6000/altivec.md: Don't set length attribute to the default
+       value, for branch instructions.
+       * config/rs6000/darwin.md: Ditto.
+       * config/rs6000/rs6000.md: Ditto.
+
 2018-08-16  Segher Boessenkool  <segher@kernel.crashing.org>
 
        * config/rs6000/rs6000.md (length): Always define as const_int 4.
index 8ee42ae6517c47d7f47291da81b4848c4a0249b7..1af96877424f9d43a6293f1e1c06e6ebb0818f86 100644 (file)
                    (use (match_operand:SI 1 "call_operand" "s"))])]
  "TARGET_MACHO && (DEFAULT_ABI == ABI_DARWIN) && TARGET_32BIT"         
  "bl %z1"
-  [(set_attr "type" "branch")
-   (set_attr "length" "4")])
+  [(set_attr "type" "branch")])
 
 (define_insn "*restore_world"
  [(match_parallel 0 "restore_world_operation"
           (match_operand:V4SI 4 "altivec_register_operand" "v"))])]
   "TARGET_ALTIVEC"
   "bl %1"
-  [(set_attr "type" "branch")
-   (set_attr "length" "4")])
+  [(set_attr "type" "branch")])
 
 (define_insn "*save_vregs_<mode>_r12"
   [(match_parallel 0 "any_parallel_operand"
           (match_operand:V4SI 4 "altivec_register_operand" "v"))])]
   "TARGET_ALTIVEC"
   "bl %1"
-  [(set_attr "type" "branch")
-   (set_attr "length" "4")])
+  [(set_attr "type" "branch")])
 
 (define_insn "*restore_vregs_<mode>_r11"
   [(match_parallel 0 "any_parallel_operand"
                             (match_operand:P 4 "short_cint_operand" "I"))))])]
   "TARGET_ALTIVEC"
   "bl %1"
-  [(set_attr "type" "branch")
-   (set_attr "length" "4")])
+  [(set_attr "type" "branch")])
 
 (define_insn "*restore_vregs_<mode>_r12"
   [(match_parallel 0 "any_parallel_operand"
                             (match_operand:P 4 "short_cint_operand" "I"))))])]
   "TARGET_ALTIVEC"
   "bl %1"
-  [(set_attr "type" "branch")
-   (set_attr "length" "4")])
+  [(set_attr "type" "branch")])
 
 ;; Simple binary operations.
 
index 48fd5b9613c6d62c100afa958e2307b15fc5401d..7c429a5e18095bc5378bdf16c896db2ce2d6e033 100644 (file)
@@ -263,8 +263,7 @@ You should have received a copy of the GNU General Public License
   return "bcl 20,31,%0\n%0:";
 }
   [(set_attr "type" "branch")
-   (set_attr "cannot_copy" "yes")
-   (set_attr "length" "4")])
+   (set_attr "cannot_copy" "yes")])
 
 (define_insn "load_macho_picbase_di"
   [(set (reg:DI LR_REGNO)
@@ -280,8 +279,7 @@ You should have received a copy of the GNU General Public License
   return "bcl 20,31,%0\n%0:";
 }
   [(set_attr "type" "branch")
-   (set_attr "cannot_copy" "yes")
-   (set_attr "length" "4")])
+   (set_attr "cannot_copy" "yes")])
 
 (define_expand "macho_correct_pic"
   [(set (match_operand 0 "")
@@ -416,8 +414,7 @@ You should have received a copy of the GNU General Public License
     return "bcl 20,31,%0\n%0:";
 }
   [(set_attr "type" "branch")
-   (set_attr "cannot_copy" "yes")
-   (set_attr "length" "4")])
+   (set_attr "cannot_copy" "yes")])
 
 (define_insn "reload_macho_picbase_di"
   [(set (reg:DI LR_REGNO)
@@ -440,8 +437,7 @@ You should have received a copy of the GNU General Public License
     return "bcl 20,31,%0\n%0:";
 }
   [(set_attr "type" "branch")
-   (set_attr "cannot_copy" "yes")
-   (set_attr "length" "4")])
+   (set_attr "cannot_copy" "yes")])
 
 ;; We need to restore the PIC register, at the site of nonlocal label.
 
index 45e42ffade11204cf2da8aeb490b0cef223149ca..c066baeeecca1848af9a4c913d3d4e2e5805b2c3 100644 (file)
     }
   return "bl %z1(%3@tlsgd)";
 }
-  [(set_attr "type" "branch")
-   (set_attr "length" "4")])
+  [(set_attr "type" "branch")])
 
 (define_insn_and_split "tls_ld_aix<TLSmode:tls_abi_suffix>"
   [(set (match_operand:TLSmode 0 "gpc_reg_operand" "=b")
     }
   return "bl %z1(%&@tlsld)";
 }
-  [(set_attr "type" "branch")
-   (set_attr "length" "4")])
+  [(set_attr "type" "branch")])
 
 (define_insn "tls_dtprel_<TLSmode:tls_abi_suffix>"
   [(set (match_operand:TLSmode 0 "gpc_reg_operand" "=r")
        (unspec:SI [(const_int 0)] UNSPEC_TOC))]
   "DEFAULT_ABI == ABI_V4 && flag_pic == 1 && TARGET_32BIT"
   "bl _GLOBAL_OFFSET_TABLE_@local-4"
-  [(set_attr "type" "branch")
-   (set_attr "length" "4")])
+  [(set_attr "type" "branch")])
 
 (define_expand "load_toc_v4_PIC_1"
   [(parallel [(set (reg:SI LR_REGNO)
    && (flag_pic == 2 || (flag_pic && TARGET_SECURE_PLT))"
   "bcl 20,31,%0\n%0:"
   [(set_attr "type" "branch")
-   (set_attr "length" "4")
    (set_attr "cannot_copy" "yes")])
 
 (define_insn "load_toc_v4_PIC_1_476"
   return templ;
 }
   [(set_attr "type" "branch")
-   (set_attr "length" "4")
    (set_attr "cannot_copy" "yes")])
 
 (define_expand "load_toc_v4_PIC_1b"
    (clobber (reg:P LR_REGNO))]
   "DEFAULT_ABI == ABI_AIX || DEFAULT_ABI == ABI_ELFv2"
   "bl %z0"
-  [(set_attr "type" "branch")
-   (set_attr "length" "4")])
+  [(set_attr "type" "branch")])
 
 (define_insn "*call_value_local_aix<mode>"
   [(set (match_operand 0 "" "")
    (clobber (reg:P LR_REGNO))]
   "DEFAULT_ABI == ABI_AIX || DEFAULT_ABI == ABI_ELFv2"
   "bl %z1"
-  [(set_attr "type" "branch")
-   (set_attr "length" "4")])
+  [(set_attr "type" "branch")])
 
 ;; Call to AIX abi function which may be in another module.
 ;; Restore the TOC pointer (r2) after the call.
   "@
    b %z0
    b%T0"
-  [(set_attr "type" "branch")
-   (set_attr "length" "4")])
+  [(set_attr "type" "branch")])
 
 (define_insn "*sibcall_value_aix<mode>"
   [(set (match_operand 0 "" "")
   "@
    b %z1
    b%T1"
-  [(set_attr "type" "branch")
-   (set_attr "length" "4")])
+  [(set_attr "type" "branch")])
 
 (define_expand "sibcall_epilogue"
   [(use (const_int 0))]
                         (match_operand:P 3 "gpc_reg_operand" "r"))])]
   ""
   "bl %1"
-  [(set_attr "type" "branch")
-   (set_attr "length" "4")])
+  [(set_attr "type" "branch")])
 
 (define_insn "*save_gpregs_<mode>_r12"
   [(match_parallel 0 "any_parallel_operand"
                         (match_operand:P 3 "gpc_reg_operand" "r"))])]
   ""
   "bl %1"
-  [(set_attr "type" "branch")
-   (set_attr "length" "4")])
+  [(set_attr "type" "branch")])
 
 (define_insn "*save_gpregs_<mode>_r1"
   [(match_parallel 0 "any_parallel_operand"
                         (match_operand:P 3 "gpc_reg_operand" "r"))])]
   ""
   "bl %1"
-  [(set_attr "type" "branch")
-   (set_attr "length" "4")])
+  [(set_attr "type" "branch")])
 
 (define_insn "*save_fpregs_<mode>_r11"
   [(match_parallel 0 "any_parallel_operand"
                         (match_operand:DF 3 "gpc_reg_operand" "d"))])]
   ""
   "bl %1"
-  [(set_attr "type" "branch")
-   (set_attr "length" "4")])
+  [(set_attr "type" "branch")])
 
 (define_insn "*save_fpregs_<mode>_r12"
   [(match_parallel 0 "any_parallel_operand"
                         (match_operand:DF 3 "gpc_reg_operand" "d"))])]
   ""
   "bl %1"
-  [(set_attr "type" "branch")
-   (set_attr "length" "4")])
+  [(set_attr "type" "branch")])
 
 (define_insn "*save_fpregs_<mode>_r1"
   [(match_parallel 0 "any_parallel_operand"
                         (match_operand:DF 3 "gpc_reg_operand" "d"))])]
   ""
   "bl %1"
-  [(set_attr "type" "branch")
-   (set_attr "length" "4")])
+  [(set_attr "type" "branch")])
 
 ; This is to explain that changes to the stack pointer should
 ; not be moved over loads from or stores to stack memory.
                        (match_operand:P 3 "memory_operand" "m"))])]
  ""
  "bl %1"
- [(set_attr "type" "branch")
-  (set_attr "length" "4")])
+ [(set_attr "type" "branch")])
 
 (define_insn "*restore_gpregs_<mode>_r12"
  [(match_parallel 0 "any_parallel_operand"
                        (match_operand:P 3 "memory_operand" "m"))])]
  ""
  "bl %1"
- [(set_attr "type" "branch")
-  (set_attr "length" "4")])
+ [(set_attr "type" "branch")])
 
 (define_insn "*restore_gpregs_<mode>_r1"
  [(match_parallel 0 "any_parallel_operand"
                        (match_operand:P 3 "memory_operand" "m"))])]
  ""
  "bl %1"
- [(set_attr "type" "branch")
-  (set_attr "length" "4")])
+ [(set_attr "type" "branch")])
 
 (define_insn "*return_and_restore_gpregs_<mode>_r11"
  [(match_parallel 0 "any_parallel_operand"
                        (match_operand:P 3 "memory_operand" "m"))])]
  ""
  "b %1"
- [(set_attr "type" "branch")
-  (set_attr "length" "4")])
+ [(set_attr "type" "branch")])
 
 (define_insn "*return_and_restore_gpregs_<mode>_r12"
  [(match_parallel 0 "any_parallel_operand"
                        (match_operand:P 3 "memory_operand" "m"))])]
  ""
  "b %1"
- [(set_attr "type" "branch")
-  (set_attr "length" "4")])
+ [(set_attr "type" "branch")])
 
 (define_insn "*return_and_restore_gpregs_<mode>_r1"
  [(match_parallel 0 "any_parallel_operand"
                        (match_operand:P 3 "memory_operand" "m"))])]
  ""
  "b %1"
- [(set_attr "type" "branch")
-  (set_attr "length" "4")])
+ [(set_attr "type" "branch")])
 
 (define_insn "*return_and_restore_fpregs_<mode>_r11"
  [(match_parallel 0 "any_parallel_operand"
                        (match_operand:DF 3 "memory_operand" "m"))])]
  ""
  "b %1"
- [(set_attr "type" "branch")
-  (set_attr "length" "4")])
+ [(set_attr "type" "branch")])
 
 (define_insn "*return_and_restore_fpregs_<mode>_r12"
  [(match_parallel 0 "any_parallel_operand"
                        (match_operand:DF 3 "memory_operand" "m"))])]
  ""
  "b %1"
- [(set_attr "type" "branch")
-  (set_attr "length" "4")])
+ [(set_attr "type" "branch")])
 
 (define_insn "*return_and_restore_fpregs_<mode>_r1"
  [(match_parallel 0 "any_parallel_operand"
                        (match_operand:DF 3 "memory_operand" "m"))])]
  ""
  "b %1"
- [(set_attr "type" "branch")
-  (set_attr "length" "4")])
+ [(set_attr "type" "branch")])
 
 (define_insn "*return_and_restore_fpregs_aix_<mode>_r11"
  [(match_parallel 0 "any_parallel_operand"
                        (match_operand:DF 3 "memory_operand" "m"))])]
  ""
  "b %1"
- [(set_attr "type" "branch")
-  (set_attr "length" "4")])
+ [(set_attr "type" "branch")])
 
 (define_insn "*return_and_restore_fpregs_aix_<mode>_r1"
  [(match_parallel 0 "any_parallel_operand"
                        (match_operand:DF 3 "memory_operand" "m"))])]
  ""
  "b %1"
- [(set_attr "type" "branch")
-  (set_attr "length" "4")])
+ [(set_attr "type" "branch")])
 
 ; This is used in compiling the unwind routines.
 (define_expand "eh_return"