From: Segher Boessenkool Date: Thu, 16 Aug 2018 19:42:36 +0000 (+0200) Subject: rs6000: Remove "length 4" from branch insns X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=a79db151ccd666c3c5e47454f52ee316fd766aad;p=gcc.git 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 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 02a20b5b7c8..19f675d3071 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,10 @@ +2018-08-16 Segher Boessenkool + + * 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 * config/rs6000/rs6000.md (length): Always define as const_int 4. diff --git a/gcc/config/rs6000/altivec.md b/gcc/config/rs6000/altivec.md index 8ee42ae6517..1af96877424 100644 --- a/gcc/config/rs6000/altivec.md +++ b/gcc/config/rs6000/altivec.md @@ -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__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__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__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. diff --git a/gcc/config/rs6000/darwin.md b/gcc/config/rs6000/darwin.md index 48fd5b9613c..7c429a5e180 100644 --- a/gcc/config/rs6000/darwin.md +++ b/gcc/config/rs6000/darwin.md @@ -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. diff --git a/gcc/config/rs6000/rs6000.md b/gcc/config/rs6000/rs6000.md index 45e42ffade1..c066baeeecc 100644 --- a/gcc/config/rs6000/rs6000.md +++ b/gcc/config/rs6000/rs6000.md @@ -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" [(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_" [(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" [(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" [(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__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__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__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__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__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__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__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__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__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__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__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__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__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__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__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"