Commit a79db151 by Segher Boessenkool Committed by Segher Boessenkool

rs6000: Remove "length 4" from branch insns

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
parent cdce4d18
2018-08-16 Segher Boessenkool <segher@kernel.crashing.org> 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. * config/rs6000/rs6000.md (length): Always define as const_int 4.
(unnamed conditional branch define_insn): Set length to 4 or 8 (unnamed conditional branch define_insn): Set length to 4 or 8
depending on offset. depending on offset.
......
...@@ -413,8 +413,7 @@ ...@@ -413,8 +413,7 @@
(use (match_operand:SI 1 "call_operand" "s"))])] (use (match_operand:SI 1 "call_operand" "s"))])]
"TARGET_MACHO && (DEFAULT_ABI == ABI_DARWIN) && TARGET_32BIT" "TARGET_MACHO && (DEFAULT_ABI == ABI_DARWIN) && TARGET_32BIT"
"bl %z1" "bl %z1"
[(set_attr "type" "branch") [(set_attr "type" "branch")])
(set_attr "length" "4")])
(define_insn "*restore_world" (define_insn "*restore_world"
[(match_parallel 0 "restore_world_operation" [(match_parallel 0 "restore_world_operation"
...@@ -441,8 +440,7 @@ ...@@ -441,8 +440,7 @@
(match_operand:V4SI 4 "altivec_register_operand" "v"))])] (match_operand:V4SI 4 "altivec_register_operand" "v"))])]
"TARGET_ALTIVEC" "TARGET_ALTIVEC"
"bl %1" "bl %1"
[(set_attr "type" "branch") [(set_attr "type" "branch")])
(set_attr "length" "4")])
(define_insn "*save_vregs_<mode>_r12" (define_insn "*save_vregs_<mode>_r12"
[(match_parallel 0 "any_parallel_operand" [(match_parallel 0 "any_parallel_operand"
...@@ -455,8 +453,7 @@ ...@@ -455,8 +453,7 @@
(match_operand:V4SI 4 "altivec_register_operand" "v"))])] (match_operand:V4SI 4 "altivec_register_operand" "v"))])]
"TARGET_ALTIVEC" "TARGET_ALTIVEC"
"bl %1" "bl %1"
[(set_attr "type" "branch") [(set_attr "type" "branch")])
(set_attr "length" "4")])
(define_insn "*restore_vregs_<mode>_r11" (define_insn "*restore_vregs_<mode>_r11"
[(match_parallel 0 "any_parallel_operand" [(match_parallel 0 "any_parallel_operand"
...@@ -469,8 +466,7 @@ ...@@ -469,8 +466,7 @@
(match_operand:P 4 "short_cint_operand" "I"))))])] (match_operand:P 4 "short_cint_operand" "I"))))])]
"TARGET_ALTIVEC" "TARGET_ALTIVEC"
"bl %1" "bl %1"
[(set_attr "type" "branch") [(set_attr "type" "branch")])
(set_attr "length" "4")])
(define_insn "*restore_vregs_<mode>_r12" (define_insn "*restore_vregs_<mode>_r12"
[(match_parallel 0 "any_parallel_operand" [(match_parallel 0 "any_parallel_operand"
...@@ -483,8 +479,7 @@ ...@@ -483,8 +479,7 @@
(match_operand:P 4 "short_cint_operand" "I"))))])] (match_operand:P 4 "short_cint_operand" "I"))))])]
"TARGET_ALTIVEC" "TARGET_ALTIVEC"
"bl %1" "bl %1"
[(set_attr "type" "branch") [(set_attr "type" "branch")])
(set_attr "length" "4")])
;; Simple binary operations. ;; Simple binary operations.
......
...@@ -263,8 +263,7 @@ You should have received a copy of the GNU General Public License ...@@ -263,8 +263,7 @@ You should have received a copy of the GNU General Public License
return "bcl 20,31,%0\n%0:"; return "bcl 20,31,%0\n%0:";
} }
[(set_attr "type" "branch") [(set_attr "type" "branch")
(set_attr "cannot_copy" "yes") (set_attr "cannot_copy" "yes")])
(set_attr "length" "4")])
(define_insn "load_macho_picbase_di" (define_insn "load_macho_picbase_di"
[(set (reg:DI LR_REGNO) [(set (reg:DI LR_REGNO)
...@@ -280,8 +279,7 @@ You should have received a copy of the GNU General Public License ...@@ -280,8 +279,7 @@ You should have received a copy of the GNU General Public License
return "bcl 20,31,%0\n%0:"; return "bcl 20,31,%0\n%0:";
} }
[(set_attr "type" "branch") [(set_attr "type" "branch")
(set_attr "cannot_copy" "yes") (set_attr "cannot_copy" "yes")])
(set_attr "length" "4")])
(define_expand "macho_correct_pic" (define_expand "macho_correct_pic"
[(set (match_operand 0 "") [(set (match_operand 0 "")
...@@ -416,8 +414,7 @@ You should have received a copy of the GNU General Public License ...@@ -416,8 +414,7 @@ You should have received a copy of the GNU General Public License
return "bcl 20,31,%0\n%0:"; return "bcl 20,31,%0\n%0:";
} }
[(set_attr "type" "branch") [(set_attr "type" "branch")
(set_attr "cannot_copy" "yes") (set_attr "cannot_copy" "yes")])
(set_attr "length" "4")])
(define_insn "reload_macho_picbase_di" (define_insn "reload_macho_picbase_di"
[(set (reg:DI LR_REGNO) [(set (reg:DI LR_REGNO)
...@@ -440,8 +437,7 @@ You should have received a copy of the GNU General Public License ...@@ -440,8 +437,7 @@ You should have received a copy of the GNU General Public License
return "bcl 20,31,%0\n%0:"; return "bcl 20,31,%0\n%0:";
} }
[(set_attr "type" "branch") [(set_attr "type" "branch")
(set_attr "cannot_copy" "yes") (set_attr "cannot_copy" "yes")])
(set_attr "length" "4")])
;; We need to restore the PIC register, at the site of nonlocal label. ;; We need to restore the PIC register, at the site of nonlocal label.
......
...@@ -9450,8 +9450,7 @@ ...@@ -9450,8 +9450,7 @@
} }
return "bl %z1(%3@tlsgd)"; return "bl %z1(%3@tlsgd)";
} }
[(set_attr "type" "branch") [(set_attr "type" "branch")])
(set_attr "length" "4")])
(define_insn_and_split "tls_ld_aix<TLSmode:tls_abi_suffix>" (define_insn_and_split "tls_ld_aix<TLSmode:tls_abi_suffix>"
[(set (match_operand:TLSmode 0 "gpc_reg_operand" "=b") [(set (match_operand:TLSmode 0 "gpc_reg_operand" "=b")
...@@ -9584,8 +9583,7 @@ ...@@ -9584,8 +9583,7 @@
} }
return "bl %z1(%&@tlsld)"; return "bl %z1(%&@tlsld)";
} }
[(set_attr "type" "branch") [(set_attr "type" "branch")])
(set_attr "length" "4")])
(define_insn "tls_dtprel_<TLSmode:tls_abi_suffix>" (define_insn "tls_dtprel_<TLSmode:tls_abi_suffix>"
[(set (match_operand:TLSmode 0 "gpc_reg_operand" "=r") [(set (match_operand:TLSmode 0 "gpc_reg_operand" "=r")
...@@ -10028,8 +10026,7 @@ ...@@ -10028,8 +10026,7 @@
(unspec:SI [(const_int 0)] UNSPEC_TOC))] (unspec:SI [(const_int 0)] UNSPEC_TOC))]
"DEFAULT_ABI == ABI_V4 && flag_pic == 1 && TARGET_32BIT" "DEFAULT_ABI == ABI_V4 && flag_pic == 1 && TARGET_32BIT"
"bl _GLOBAL_OFFSET_TABLE_@local-4" "bl _GLOBAL_OFFSET_TABLE_@local-4"
[(set_attr "type" "branch") [(set_attr "type" "branch")])
(set_attr "length" "4")])
(define_expand "load_toc_v4_PIC_1" (define_expand "load_toc_v4_PIC_1"
[(parallel [(set (reg:SI LR_REGNO) [(parallel [(set (reg:SI LR_REGNO)
...@@ -10047,7 +10044,6 @@ ...@@ -10047,7 +10044,6 @@
&& (flag_pic == 2 || (flag_pic && TARGET_SECURE_PLT))" && (flag_pic == 2 || (flag_pic && TARGET_SECURE_PLT))"
"bcl 20,31,%0\n%0:" "bcl 20,31,%0\n%0:"
[(set_attr "type" "branch") [(set_attr "type" "branch")
(set_attr "length" "4")
(set_attr "cannot_copy" "yes")]) (set_attr "cannot_copy" "yes")])
(define_insn "load_toc_v4_PIC_1_476" (define_insn "load_toc_v4_PIC_1_476"
...@@ -10065,7 +10061,6 @@ ...@@ -10065,7 +10061,6 @@
return templ; return templ;
} }
[(set_attr "type" "branch") [(set_attr "type" "branch")
(set_attr "length" "4")
(set_attr "cannot_copy" "yes")]) (set_attr "cannot_copy" "yes")])
(define_expand "load_toc_v4_PIC_1b" (define_expand "load_toc_v4_PIC_1b"
...@@ -10649,8 +10644,7 @@ ...@@ -10649,8 +10644,7 @@
(clobber (reg:P LR_REGNO))] (clobber (reg:P LR_REGNO))]
"DEFAULT_ABI == ABI_AIX || DEFAULT_ABI == ABI_ELFv2" "DEFAULT_ABI == ABI_AIX || DEFAULT_ABI == ABI_ELFv2"
"bl %z0" "bl %z0"
[(set_attr "type" "branch") [(set_attr "type" "branch")])
(set_attr "length" "4")])
(define_insn "*call_value_local_aix<mode>" (define_insn "*call_value_local_aix<mode>"
[(set (match_operand 0 "" "") [(set (match_operand 0 "" "")
...@@ -10659,8 +10653,7 @@ ...@@ -10659,8 +10653,7 @@
(clobber (reg:P LR_REGNO))] (clobber (reg:P LR_REGNO))]
"DEFAULT_ABI == ABI_AIX || DEFAULT_ABI == ABI_ELFv2" "DEFAULT_ABI == ABI_AIX || DEFAULT_ABI == ABI_ELFv2"
"bl %z1" "bl %z1"
[(set_attr "type" "branch") [(set_attr "type" "branch")])
(set_attr "length" "4")])
;; Call to AIX abi function which may be in another module. ;; Call to AIX abi function which may be in another module.
;; Restore the TOC pointer (r2) after the call. ;; Restore the TOC pointer (r2) after the call.
...@@ -11043,8 +11036,7 @@ ...@@ -11043,8 +11036,7 @@
"@ "@
b %z0 b %z0
b%T0" b%T0"
[(set_attr "type" "branch") [(set_attr "type" "branch")])
(set_attr "length" "4")])
(define_insn "*sibcall_value_aix<mode>" (define_insn "*sibcall_value_aix<mode>"
[(set (match_operand 0 "" "") [(set (match_operand 0 "" "")
...@@ -11055,8 +11047,7 @@ ...@@ -11055,8 +11047,7 @@
"@ "@
b %z1 b %z1
b%T1" b%T1"
[(set_attr "type" "branch") [(set_attr "type" "branch")])
(set_attr "length" "4")])
(define_expand "sibcall_epilogue" (define_expand "sibcall_epilogue"
[(use (const_int 0))] [(use (const_int 0))]
...@@ -12985,8 +12976,7 @@ ...@@ -12985,8 +12976,7 @@
(match_operand:P 3 "gpc_reg_operand" "r"))])] (match_operand:P 3 "gpc_reg_operand" "r"))])]
"" ""
"bl %1" "bl %1"
[(set_attr "type" "branch") [(set_attr "type" "branch")])
(set_attr "length" "4")])
(define_insn "*save_gpregs_<mode>_r12" (define_insn "*save_gpregs_<mode>_r12"
[(match_parallel 0 "any_parallel_operand" [(match_parallel 0 "any_parallel_operand"
...@@ -12997,8 +12987,7 @@ ...@@ -12997,8 +12987,7 @@
(match_operand:P 3 "gpc_reg_operand" "r"))])] (match_operand:P 3 "gpc_reg_operand" "r"))])]
"" ""
"bl %1" "bl %1"
[(set_attr "type" "branch") [(set_attr "type" "branch")])
(set_attr "length" "4")])
(define_insn "*save_gpregs_<mode>_r1" (define_insn "*save_gpregs_<mode>_r1"
[(match_parallel 0 "any_parallel_operand" [(match_parallel 0 "any_parallel_operand"
...@@ -13009,8 +12998,7 @@ ...@@ -13009,8 +12998,7 @@
(match_operand:P 3 "gpc_reg_operand" "r"))])] (match_operand:P 3 "gpc_reg_operand" "r"))])]
"" ""
"bl %1" "bl %1"
[(set_attr "type" "branch") [(set_attr "type" "branch")])
(set_attr "length" "4")])
(define_insn "*save_fpregs_<mode>_r11" (define_insn "*save_fpregs_<mode>_r11"
[(match_parallel 0 "any_parallel_operand" [(match_parallel 0 "any_parallel_operand"
...@@ -13021,8 +13009,7 @@ ...@@ -13021,8 +13009,7 @@
(match_operand:DF 3 "gpc_reg_operand" "d"))])] (match_operand:DF 3 "gpc_reg_operand" "d"))])]
"" ""
"bl %1" "bl %1"
[(set_attr "type" "branch") [(set_attr "type" "branch")])
(set_attr "length" "4")])
(define_insn "*save_fpregs_<mode>_r12" (define_insn "*save_fpregs_<mode>_r12"
[(match_parallel 0 "any_parallel_operand" [(match_parallel 0 "any_parallel_operand"
...@@ -13033,8 +13020,7 @@ ...@@ -13033,8 +13020,7 @@
(match_operand:DF 3 "gpc_reg_operand" "d"))])] (match_operand:DF 3 "gpc_reg_operand" "d"))])]
"" ""
"bl %1" "bl %1"
[(set_attr "type" "branch") [(set_attr "type" "branch")])
(set_attr "length" "4")])
(define_insn "*save_fpregs_<mode>_r1" (define_insn "*save_fpregs_<mode>_r1"
[(match_parallel 0 "any_parallel_operand" [(match_parallel 0 "any_parallel_operand"
...@@ -13045,8 +13031,7 @@ ...@@ -13045,8 +13031,7 @@
(match_operand:DF 3 "gpc_reg_operand" "d"))])] (match_operand:DF 3 "gpc_reg_operand" "d"))])]
"" ""
"bl %1" "bl %1"
[(set_attr "type" "branch") [(set_attr "type" "branch")])
(set_attr "length" "4")])
; This is to explain that changes to the stack pointer should ; This is to explain that changes to the stack pointer should
; not be moved over loads from or stores to stack memory. ; not be moved over loads from or stores to stack memory.
...@@ -13163,8 +13148,7 @@ ...@@ -13163,8 +13148,7 @@
(match_operand:P 3 "memory_operand" "m"))])] (match_operand:P 3 "memory_operand" "m"))])]
"" ""
"bl %1" "bl %1"
[(set_attr "type" "branch") [(set_attr "type" "branch")])
(set_attr "length" "4")])
(define_insn "*restore_gpregs_<mode>_r12" (define_insn "*restore_gpregs_<mode>_r12"
[(match_parallel 0 "any_parallel_operand" [(match_parallel 0 "any_parallel_operand"
...@@ -13175,8 +13159,7 @@ ...@@ -13175,8 +13159,7 @@
(match_operand:P 3 "memory_operand" "m"))])] (match_operand:P 3 "memory_operand" "m"))])]
"" ""
"bl %1" "bl %1"
[(set_attr "type" "branch") [(set_attr "type" "branch")])
(set_attr "length" "4")])
(define_insn "*restore_gpregs_<mode>_r1" (define_insn "*restore_gpregs_<mode>_r1"
[(match_parallel 0 "any_parallel_operand" [(match_parallel 0 "any_parallel_operand"
...@@ -13187,8 +13170,7 @@ ...@@ -13187,8 +13170,7 @@
(match_operand:P 3 "memory_operand" "m"))])] (match_operand:P 3 "memory_operand" "m"))])]
"" ""
"bl %1" "bl %1"
[(set_attr "type" "branch") [(set_attr "type" "branch")])
(set_attr "length" "4")])
(define_insn "*return_and_restore_gpregs_<mode>_r11" (define_insn "*return_and_restore_gpregs_<mode>_r11"
[(match_parallel 0 "any_parallel_operand" [(match_parallel 0 "any_parallel_operand"
...@@ -13200,8 +13182,7 @@ ...@@ -13200,8 +13182,7 @@
(match_operand:P 3 "memory_operand" "m"))])] (match_operand:P 3 "memory_operand" "m"))])]
"" ""
"b %1" "b %1"
[(set_attr "type" "branch") [(set_attr "type" "branch")])
(set_attr "length" "4")])
(define_insn "*return_and_restore_gpregs_<mode>_r12" (define_insn "*return_and_restore_gpregs_<mode>_r12"
[(match_parallel 0 "any_parallel_operand" [(match_parallel 0 "any_parallel_operand"
...@@ -13213,8 +13194,7 @@ ...@@ -13213,8 +13194,7 @@
(match_operand:P 3 "memory_operand" "m"))])] (match_operand:P 3 "memory_operand" "m"))])]
"" ""
"b %1" "b %1"
[(set_attr "type" "branch") [(set_attr "type" "branch")])
(set_attr "length" "4")])
(define_insn "*return_and_restore_gpregs_<mode>_r1" (define_insn "*return_and_restore_gpregs_<mode>_r1"
[(match_parallel 0 "any_parallel_operand" [(match_parallel 0 "any_parallel_operand"
...@@ -13226,8 +13206,7 @@ ...@@ -13226,8 +13206,7 @@
(match_operand:P 3 "memory_operand" "m"))])] (match_operand:P 3 "memory_operand" "m"))])]
"" ""
"b %1" "b %1"
[(set_attr "type" "branch") [(set_attr "type" "branch")])
(set_attr "length" "4")])
(define_insn "*return_and_restore_fpregs_<mode>_r11" (define_insn "*return_and_restore_fpregs_<mode>_r11"
[(match_parallel 0 "any_parallel_operand" [(match_parallel 0 "any_parallel_operand"
...@@ -13239,8 +13218,7 @@ ...@@ -13239,8 +13218,7 @@
(match_operand:DF 3 "memory_operand" "m"))])] (match_operand:DF 3 "memory_operand" "m"))])]
"" ""
"b %1" "b %1"
[(set_attr "type" "branch") [(set_attr "type" "branch")])
(set_attr "length" "4")])
(define_insn "*return_and_restore_fpregs_<mode>_r12" (define_insn "*return_and_restore_fpregs_<mode>_r12"
[(match_parallel 0 "any_parallel_operand" [(match_parallel 0 "any_parallel_operand"
...@@ -13252,8 +13230,7 @@ ...@@ -13252,8 +13230,7 @@
(match_operand:DF 3 "memory_operand" "m"))])] (match_operand:DF 3 "memory_operand" "m"))])]
"" ""
"b %1" "b %1"
[(set_attr "type" "branch") [(set_attr "type" "branch")])
(set_attr "length" "4")])
(define_insn "*return_and_restore_fpregs_<mode>_r1" (define_insn "*return_and_restore_fpregs_<mode>_r1"
[(match_parallel 0 "any_parallel_operand" [(match_parallel 0 "any_parallel_operand"
...@@ -13265,8 +13242,7 @@ ...@@ -13265,8 +13242,7 @@
(match_operand:DF 3 "memory_operand" "m"))])] (match_operand:DF 3 "memory_operand" "m"))])]
"" ""
"b %1" "b %1"
[(set_attr "type" "branch") [(set_attr "type" "branch")])
(set_attr "length" "4")])
(define_insn "*return_and_restore_fpregs_aix_<mode>_r11" (define_insn "*return_and_restore_fpregs_aix_<mode>_r11"
[(match_parallel 0 "any_parallel_operand" [(match_parallel 0 "any_parallel_operand"
...@@ -13277,8 +13253,7 @@ ...@@ -13277,8 +13253,7 @@
(match_operand:DF 3 "memory_operand" "m"))])] (match_operand:DF 3 "memory_operand" "m"))])]
"" ""
"b %1" "b %1"
[(set_attr "type" "branch") [(set_attr "type" "branch")])
(set_attr "length" "4")])
(define_insn "*return_and_restore_fpregs_aix_<mode>_r1" (define_insn "*return_and_restore_fpregs_aix_<mode>_r1"
[(match_parallel 0 "any_parallel_operand" [(match_parallel 0 "any_parallel_operand"
...@@ -13289,8 +13264,7 @@ ...@@ -13289,8 +13264,7 @@
(match_operand:DF 3 "memory_operand" "m"))])] (match_operand:DF 3 "memory_operand" "m"))])]
"" ""
"b %1" "b %1"
[(set_attr "type" "branch") [(set_attr "type" "branch")])
(set_attr "length" "4")])
; This is used in compiling the unwind routines. ; This is used in compiling the unwind routines.
(define_expand "eh_return" (define_expand "eh_return"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment