aboutsummaryrefslogtreecommitdiff
path: root/gcc/config/s390
diff options
context:
space:
mode:
authorIlya Leoshkevich <iii@linux.ibm.com>2021-05-31 21:59:50 +0200
committerIlya Leoshkevich <iii@linux.ibm.com>2021-06-02 11:56:32 +0200
commit22d834e32b509b22f68000b7f012d8e45d833ea8 (patch)
treedfe850ee8086cc35d7afd6ac8eaf8c943326acbb /gcc/config/s390
parent9ca24bd34b6ac44c17f949d89ff60d0fd4665133 (diff)
downloadgcc-22d834e32b509b22f68000b7f012d8e45d833ea8.zip
gcc-22d834e32b509b22f68000b7f012d8e45d833ea8.tar.gz
gcc-22d834e32b509b22f68000b7f012d8e45d833ea8.tar.bz2
IBM Z: Remove match_scratch workaround
Since commit dd1ef00c45ba ("Fix bug in the define_subst handling that made match_scratch unusable for multi-alternative patterns.") the workaround for that bug in *ashrdi3_31<setcc><cconly> is not only no longer necessary, but actually breaks the build. Get rid of it by using only one alternative in (match_scratch). It will be replicated as many times as needed in order to match the pattern with which (define_subst) is used. gcc/ChangeLog: * config/s390/s390.md(*ashrdi3_31<setcc><cconly>): Use a single constraint. * config/s390/subst.md(cconly_subst): Use a single constraint in (match_scratch). gcc/testsuite/ChangeLog: * gcc.target/s390/ashr.c: New test.
Diffstat (limited to 'gcc/config/s390')
-rw-r--r--gcc/config/s390/s390.md14
-rw-r--r--gcc/config/s390/subst.md2
2 files changed, 5 insertions, 11 deletions
diff --git a/gcc/config/s390/s390.md b/gcc/config/s390/s390.md
index 7faf775..0c5b4dc 100644
--- a/gcc/config/s390/s390.md
+++ b/gcc/config/s390/s390.md
@@ -9328,19 +9328,13 @@
""
"")
-; FIXME: The number of alternatives is doubled here to match the fix
-; number of 2 in the subst pattern for the (clobber (match_scratch...
-; The right fix should be to support match_scratch in the output
-; pattern of a define_subst.
(define_insn "*ashrdi3_31<setcc><cconly>"
- [(set (match_operand:DI 0 "register_operand" "=d, d")
- (ashiftrt:DI (match_operand:DI 1 "register_operand" "0, 0")
- (match_operand:QI 2 "shift_count_operand" "jsc,jsc")))
+ [(set (match_operand:DI 0 "register_operand" "=d")
+ (ashiftrt:DI (match_operand:DI 1 "register_operand" "0")
+ (match_operand:QI 2 "shift_count_operand" "jsc")))
(clobber (reg:CC CC_REGNUM))]
"!TARGET_ZARCH"
- "@
- srda\t%0,%Y2
- srda\t%0,%Y2"
+ "srda\t%0,%Y2"
[(set_attr "op_type" "RS")
(set_attr "atype" "reg")])
diff --git a/gcc/config/s390/subst.md b/gcc/config/s390/subst.md
index 384af11..3ea6fc4 100644
--- a/gcc/config/s390/subst.md
+++ b/gcc/config/s390/subst.md
@@ -45,7 +45,7 @@
"s390_match_ccmode(insn, CCSmode)"
[(set (reg CC_REGNUM)
(compare (match_dup 1) (const_int 0)))
- (clobber (match_scratch:DSI 0 "=d,d"))])
+ (clobber (match_scratch:DSI 0 "=d"))])
(define_subst_attr "cconly" "cconly_subst" "" "_cconly")