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
This commit is contained in:
Segher Boessenkool 2018-08-16 21:42:36 +02:00 committed by Segher Boessenkool
parent cdce4d18f9
commit a79db151cc
4 changed files with 40 additions and 68 deletions

View 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.

View File

@ -413,8 +413,7 @@
(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"
@ -441,8 +440,7 @@
(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"
@ -455,8 +453,7 @@
(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"
@ -469,8 +466,7 @@
(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"
@ -483,8 +479,7 @@
(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.

View 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.

View File

@ -9450,8 +9450,7 @@
}
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")
@ -9584,8 +9583,7 @@
}
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")
@ -10028,8 +10026,7 @@
(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)
@ -10047,7 +10044,6 @@
&& (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"
@ -10065,7 +10061,6 @@
return templ;
}
[(set_attr "type" "branch")
(set_attr "length" "4")
(set_attr "cannot_copy" "yes")])
(define_expand "load_toc_v4_PIC_1b"
@ -10649,8 +10644,7 @@
(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 "" "")
@ -10659,8 +10653,7 @@
(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.
@ -11043,8 +11036,7 @@
"@
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 "" "")
@ -11055,8 +11047,7 @@
"@
b %z1
b%T1"
[(set_attr "type" "branch")
(set_attr "length" "4")])
[(set_attr "type" "branch")])
(define_expand "sibcall_epilogue"
[(use (const_int 0))]
@ -12985,8 +12976,7 @@
(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"
@ -12997,8 +12987,7 @@
(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"
@ -13009,8 +12998,7 @@
(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"
@ -13021,8 +13009,7 @@
(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"
@ -13033,8 +13020,7 @@
(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"
@ -13045,8 +13031,7 @@
(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.
@ -13163,8 +13148,7 @@
(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"
@ -13175,8 +13159,7 @@
(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"
@ -13187,8 +13170,7 @@
(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"
@ -13200,8 +13182,7 @@
(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"
@ -13213,8 +13194,7 @@
(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"
@ -13226,8 +13206,7 @@
(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"
@ -13239,8 +13218,7 @@
(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"
@ -13252,8 +13230,7 @@
(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"
@ -13265,8 +13242,7 @@
(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"
@ -13277,8 +13253,7 @@
(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"
@ -13289,8 +13264,7 @@
(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"