aboutsummaryrefslogtreecommitdiff
path: root/gcc/config/gcn/gcn-valu.md
diff options
context:
space:
mode:
authorAndrew Stubbs <ams@codesourcery.com>2020-02-21 11:07:55 +0000
committerAndrew Stubbs <ams@codesourcery.com>2020-02-21 11:56:20 +0000
commit3abfd4f3410af27060a11b8adaa9836d5a77eae1 (patch)
tree8207446cffd4c3ec2a2b8b6ea7eaadeb72e5ebc6 /gcc/config/gcn/gcn-valu.md
parent2291d1fd85744f26bf4943187266d28c3b89d200 (diff)
downloadgcc-3abfd4f3410af27060a11b8adaa9836d5a77eae1.zip
gcc-3abfd4f3410af27060a11b8adaa9836d5a77eae1.tar.gz
gcc-3abfd4f3410af27060a11b8adaa9836d5a77eae1.tar.bz2
amdgcn: Align VGPR pairs
Aligning the registers is not needed by the architecture, but doing so allows us to remove the requirement for bug-prone early-clobber constraints from many split patterns (and avoid adding more in future). 2020-02-21 Andrew Stubbs <ams@codesourcery.com> gcc/ * config/gcn/gcn.c (gcn_hard_regno_mode_ok): Align VGPR pairs. * config/gcn/gcn-valu.md (addv64di3): Remove early-clobber. (addv64di3_exec): Likewise. (subv64di3): Likewise. (subv64di3_exec): Likewise. (addv64di3_zext): Likewise. (addv64di3_zext_exec): Likewise. (addv64di3_zext_dup): Likewise. (addv64di3_zext_dup_exec): Likewise. (addv64di3_zext_dup2): Likewise. (addv64di3_zext_dup2_exec): Likewise. (addv64di3_sext_dup2): Likewise. (addv64di3_sext_dup2_exec): Likewise. (<expander>v64di3): Likewise. (<expander>v64di3_exec): Likewise. (*<reduc_op>_dpp_shr_v64di): Likewise. (*plus_carry_dpp_shr_v64di): Likewise. * config/gcn/gcn.md (adddi3): Likewise. (addptrdi3): Likewise. (<expander>di3): Likewise.
Diffstat (limited to 'gcc/config/gcn/gcn-valu.md')
-rw-r--r--gcc/config/gcn/gcn-valu.md101
1 files changed, 49 insertions, 52 deletions
diff --git a/gcc/config/gcn/gcn-valu.md b/gcc/config/gcn/gcn-valu.md
index edac362..d5e6d0a 100644
--- a/gcc/config/gcn/gcn-valu.md
+++ b/gcc/config/gcn/gcn-valu.md
@@ -1171,10 +1171,10 @@
(set_attr "length" "4,8,4,8")])
(define_insn_and_split "addv64di3"
- [(set (match_operand:V64DI 0 "register_operand" "= &v, &v")
+ [(set (match_operand:V64DI 0 "register_operand" "= v")
(plus:V64DI
- (match_operand:V64DI 1 "register_operand" "%vDb,vDb0")
- (match_operand:V64DI 2 "gcn_alu_operand" "vDb0, vDb")))
+ (match_operand:V64DI 1 "register_operand" "%vDb")
+ (match_operand:V64DI 2 "gcn_alu_operand" " vDb")))
(clobber (reg:DI VCC_REG))]
""
"#"
@@ -1200,14 +1200,13 @@
(set_attr "length" "8")])
(define_insn_and_split "addv64di3_exec"
- [(set (match_operand:V64DI 0 "register_operand" "= &v, &v, &v")
+ [(set (match_operand:V64DI 0 "register_operand" "= v")
(vec_merge:V64DI
(plus:V64DI
- (match_operand:V64DI 1 "register_operand" "%vDb,vDb0,vDb")
- (match_operand:V64DI 2 "gcn_alu_operand" "vDb0, vDb,vDb"))
- (match_operand:V64DI 3 "gcn_register_or_unspec_operand"
- " U, U, 0")
- (match_operand:DI 4 "gcn_exec_reg_operand" " e, e, e")))
+ (match_operand:V64DI 1 "register_operand" "%vDb")
+ (match_operand:V64DI 2 "gcn_alu_operand" " vDb"))
+ (match_operand:V64DI 3 "gcn_register_or_unspec_operand" " U0")
+ (match_operand:DI 4 "gcn_exec_reg_operand" " e")))
(clobber (reg:DI VCC_REG))]
""
"#"
@@ -1238,10 +1237,10 @@
(set_attr "length" "8")])
(define_insn_and_split "subv64di3"
- [(set (match_operand:V64DI 0 "register_operand" "=&v, &v, &v, &v")
- (minus:V64DI
- (match_operand:V64DI 1 "gcn_alu_operand" "vDb,vDb0, v, v0")
- (match_operand:V64DI 2 "gcn_alu_operand" " v0, v,vDb0,vDb")))
+ [(set (match_operand:V64DI 0 "register_operand" "= v, v")
+ (minus:V64DI
+ (match_operand:V64DI 1 "gcn_alu_operand" "vDb, v")
+ (match_operand:V64DI 2 "gcn_alu_operand" " v,vDb")))
(clobber (reg:DI VCC_REG))]
""
"#"
@@ -1267,14 +1266,13 @@
(set_attr "length" "8")])
(define_insn_and_split "subv64di3_exec"
- [(set (match_operand:V64DI 0 "register_operand" "= &v, &v, &v, &v")
+ [(set (match_operand:V64DI 0 "register_operand" "= v, v")
(vec_merge:V64DI
(minus:V64DI
- (match_operand:V64DI 1 "gcn_alu_operand" "vSvB,vSvB0, v, v0")
- (match_operand:V64DI 2 "gcn_alu_operand" " v0, v,vSvB0,vSvB"))
- (match_operand:V64DI 3 "gcn_register_or_unspec_operand"
- " U0, U0, U0, U0")
- (match_operand:DI 4 "gcn_exec_reg_operand" " e, e, e, e")))
+ (match_operand:V64DI 1 "gcn_alu_operand" "vSvB, v")
+ (match_operand:V64DI 2 "gcn_alu_operand" " v,vSvB"))
+ (match_operand:V64DI 3 "gcn_register_or_unspec_operand" " U0, U0")
+ (match_operand:DI 4 "gcn_exec_reg_operand" " e, e")))
(clobber (reg:DI VCC_REG))]
"register_operand (operands[1], VOIDmode)
|| register_operand (operands[2], VOIDmode)"
@@ -1306,11 +1304,11 @@
(set_attr "length" "8")])
(define_insn_and_split "addv64di3_zext"
- [(set (match_operand:V64DI 0 "register_operand" "=&v, &v, &v, &v")
+ [(set (match_operand:V64DI 0 "register_operand" "= v, v")
(plus:V64DI
(zero_extend:V64DI
- (match_operand:V64SI 1 "gcn_alu_operand" "0vA,0vB, vA, vB"))
- (match_operand:V64DI 2 "gcn_alu_operand" "vDb,vDA,0vDb,0vDA")))
+ (match_operand:V64SI 1 "gcn_alu_operand" " vA, vB"))
+ (match_operand:V64DI 2 "gcn_alu_operand" "vDb,vDA")))
(clobber (reg:DI VCC_REG))]
""
"#"
@@ -1334,15 +1332,14 @@
(set_attr "length" "8")])
(define_insn_and_split "addv64di3_zext_exec"
- [(set (match_operand:V64DI 0 "register_operand" "=&v, &v, &v, &v")
+ [(set (match_operand:V64DI 0 "register_operand" "= v, v")
(vec_merge:V64DI
(plus:V64DI
(zero_extend:V64DI
- (match_operand:V64SI 1 "gcn_alu_operand" "0vA, vA,0vB, vB"))
- (match_operand:V64DI 2 "gcn_alu_operand" "vDb,0vDb,vDA,0vDA"))
- (match_operand:V64DI 3 "gcn_register_or_unspec_operand"
- " U0, U0, U0, U0")
- (match_operand:DI 4 "gcn_exec_reg_operand" " e, e, e, e")))
+ (match_operand:V64SI 1 "gcn_alu_operand" " vA, vB"))
+ (match_operand:V64DI 2 "gcn_alu_operand" "vDb,vDA"))
+ (match_operand:V64DI 3 "gcn_register_or_unspec_operand" " U0, U0")
+ (match_operand:DI 4 "gcn_exec_reg_operand" " e, e")))
(clobber (reg:DI VCC_REG))]
""
"#"
@@ -1371,12 +1368,12 @@
(set_attr "length" "8")])
(define_insn_and_split "addv64di3_zext_dup"
- [(set (match_operand:V64DI 0 "register_operand" "= &v, &v")
+ [(set (match_operand:V64DI 0 "register_operand" "= v, v")
(plus:V64DI
(zero_extend:V64DI
(vec_duplicate:V64SI
- (match_operand:SI 1 "gcn_alu_operand" " BSv, ASv")))
- (match_operand:V64DI 2 "gcn_alu_operand" "vDA0,vDb0")))
+ (match_operand:SI 1 "gcn_alu_operand" "BSv,ASv")))
+ (match_operand:V64DI 2 "gcn_alu_operand" "vDA,vDb")))
(clobber (reg:DI VCC_REG))]
""
"#"
@@ -1400,15 +1397,15 @@
(set_attr "length" "8")])
(define_insn_and_split "addv64di3_zext_dup_exec"
- [(set (match_operand:V64DI 0 "register_operand" "= &v, &v")
+ [(set (match_operand:V64DI 0 "register_operand" "= v, v")
(vec_merge:V64DI
(plus:V64DI
(zero_extend:V64DI
(vec_duplicate:V64SI
- (match_operand:SI 1 "gcn_alu_operand" " ASv, BSv")))
- (match_operand:V64DI 2 "gcn_alu_operand" "vDb0,vDA0"))
- (match_operand:V64DI 3 "gcn_register_or_unspec_operand" " U0, U0")
- (match_operand:DI 4 "gcn_exec_reg_operand" " e, e")))
+ (match_operand:SI 1 "gcn_alu_operand" "ASv,BSv")))
+ (match_operand:V64DI 2 "gcn_alu_operand" "vDb,vDA"))
+ (match_operand:V64DI 3 "gcn_register_or_unspec_operand" " U0, U0")
+ (match_operand:DI 4 "gcn_exec_reg_operand" " e, e")))
(clobber (reg:DI VCC_REG))]
""
"#"
@@ -1437,7 +1434,7 @@
(set_attr "length" "8")])
(define_insn_and_split "addv64di3_zext_dup2"
- [(set (match_operand:V64DI 0 "register_operand" "= &v")
+ [(set (match_operand:V64DI 0 "register_operand" "= v")
(plus:V64DI
(zero_extend:V64DI (match_operand:V64SI 1 "gcn_alu_operand" " vA"))
(vec_duplicate:V64DI (match_operand:DI 2 "gcn_alu_operand" "DbSv"))))
@@ -1463,7 +1460,7 @@
(set_attr "length" "8")])
(define_insn_and_split "addv64di3_zext_dup2_exec"
- [(set (match_operand:V64DI 0 "register_operand" "=&v")
+ [(set (match_operand:V64DI 0 "register_operand" "= v")
(vec_merge:V64DI
(plus:V64DI
(zero_extend:V64DI (match_operand:V64SI 1 "gcn_alu_operand"
@@ -1500,7 +1497,7 @@
(set_attr "length" "8")])
(define_insn_and_split "addv64di3_sext_dup2"
- [(set (match_operand:V64DI 0 "register_operand" "=&v")
+ [(set (match_operand:V64DI 0 "register_operand" "= v")
(plus:V64DI
(sign_extend:V64DI (match_operand:V64SI 1 "gcn_alu_operand" " vA"))
(vec_duplicate:V64DI (match_operand:DI 2 "gcn_alu_operand" "BSv"))))
@@ -1528,7 +1525,7 @@
(set_attr "length" "8")])
(define_insn_and_split "addv64di3_sext_dup2_exec"
- [(set (match_operand:V64DI 0 "register_operand" "=&v")
+ [(set (match_operand:V64DI 0 "register_operand" "= v")
(vec_merge:V64DI
(plus:V64DI
(sign_extend:V64DI (match_operand:V64SI 1 "gcn_alu_operand"
@@ -1935,10 +1932,10 @@
(set_attr "length" "8,8")])
(define_insn_and_split "<expander>v64di3"
- [(set (match_operand:V64DI 0 "gcn_valu_dst_operand" "=&v,RD")
+ [(set (match_operand:V64DI 0 "gcn_valu_dst_operand" "= v,RD")
(bitop:V64DI
- (match_operand:V64DI 1 "gcn_valu_src0_operand" "% v,RD")
- (match_operand:V64DI 2 "gcn_valu_src1com_operand" "vSvB, v")))]
+ (match_operand:V64DI 1 "gcn_valu_src0_operand" "% v,RD")
+ (match_operand:V64DI 2 "gcn_valu_src1com_operand" "vSvB, v")))]
""
"@
#
@@ -1960,7 +1957,7 @@
(set_attr "length" "16,8")])
(define_insn_and_split "<expander>v64di3_exec"
- [(set (match_operand:V64DI 0 "gcn_valu_dst_operand" "=&v,RD")
+ [(set (match_operand:V64DI 0 "gcn_valu_dst_operand" "= v,RD")
(vec_merge:V64DI
(bitop:V64DI
(match_operand:V64DI 1 "gcn_valu_src0_operand" "% v,RD")
@@ -2999,11 +2996,11 @@
(set_attr "length" "8")])
(define_insn_and_split "*<reduc_op>_dpp_shr_v64di"
- [(set (match_operand:V64DI 0 "register_operand" "=&v")
+ [(set (match_operand:V64DI 0 "register_operand" "=v")
(unspec:V64DI
- [(match_operand:V64DI 1 "register_operand" "v0")
- (match_operand:V64DI 2 "register_operand" "v0")
- (match_operand:SI 3 "const_int_operand" "n")]
+ [(match_operand:V64DI 1 "register_operand" "v")
+ (match_operand:V64DI 2 "register_operand" "v")
+ (match_operand:SI 3 "const_int_operand" "n")]
REDUC_2REG_UNSPEC))]
""
"#"
@@ -3065,11 +3062,11 @@
(set_attr "length" "8")])
(define_insn_and_split "*plus_carry_dpp_shr_v64di"
- [(set (match_operand:V64DI 0 "register_operand" "=&v")
+ [(set (match_operand:V64DI 0 "register_operand" "=v")
(unspec:V64DI
- [(match_operand:V64DI 1 "register_operand" "v0")
- (match_operand:V64DI 2 "register_operand" "v0")
- (match_operand:SI 3 "const_int_operand" "n")]
+ [(match_operand:V64DI 1 "register_operand" "v")
+ (match_operand:V64DI 2 "register_operand" "v")
+ (match_operand:SI 3 "const_int_operand" "n")]
UNSPEC_PLUS_CARRY_DPP_SHR))
(clobber (reg:DI VCC_REG))]
""