aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOleg Endo <olegendo@gcc.gnu.org>2015-05-21 12:36:35 +0000
committerOleg Endo <olegendo@gcc.gnu.org>2015-05-21 12:36:35 +0000
commit0daff5e0c87a619093f4718c0ec212b1b461bfde (patch)
tree9db69ec76547981ea3fafc084b84f03d0d02ad29
parentcad97339449568ae711fb6430d56372e0974958d (diff)
downloadgcc-0daff5e0c87a619093f4718c0ec212b1b461bfde.zip
gcc-0daff5e0c87a619093f4718c0ec212b1b461bfde.tar.gz
gcc-0daff5e0c87a619093f4718c0ec212b1b461bfde.tar.bz2
re PR target/54236 ([SH] Improve addc and subc insn utilization)
gcc/ PR target/54236 * config/sh/sh.md (*round_int_even): Reject pattern if operands[0] and operands[1] are the same. gcc/testsuite/ PR target/54236 * gcc.target/sh/pr54236-2.c: Fix typo in comment. From-SVN: r223479
-rw-r--r--gcc/ChangeLog6
-rw-r--r--gcc/config/sh/sh.md3
-rw-r--r--gcc/testsuite/ChangeLog5
-rw-r--r--gcc/testsuite/gcc.target/sh/pr54236-2.c2
4 files changed, 14 insertions, 2 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 550d98c..9218257 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,9 @@
+2015-05-21 Oleg Endo <olegendo@gcc.gnu.org>
+
+ PR target/54236
+ * config/sh/sh.md (*round_int_even): Reject pattern if operands[0] and
+ operands[1] are the same.
+
2015-05-21 Ilya Enkovich <enkovich.gnu@gmail.com>
PR middle-end/66221
diff --git a/gcc/config/sh/sh.md b/gcc/config/sh/sh.md
index 3b66992..2d95b9c 100644
--- a/gcc/config/sh/sh.md
+++ b/gcc/config/sh/sh.md
@@ -2011,7 +2011,8 @@
(and:SI (plus:SI (match_operand:SI 1 "arith_reg_operand")
(const_int 1))
(const_int -2)))]
- "TARGET_SH1 && !TARGET_SH2A && can_create_pseudo_p ()"
+ "TARGET_SH1 && !TARGET_SH2A && can_create_pseudo_p ()
+ && !reg_overlap_mentioned_p (operands[0], operands[1])"
"#"
"&& 1"
[(set (match_dup 0) (const_int -2))
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog
index 81f6779..2cd1577 100644
--- a/gcc/testsuite/ChangeLog
+++ b/gcc/testsuite/ChangeLog
@@ -1,3 +1,8 @@
+2015-05-21 Oleg Endo <olegendo@gcc.gnu.org>
+
+ PR target/54236
+ * gcc.target/sh/pr54236-2.c: Fix typo in comment.
+
2015-05-21 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
PR target/65937
diff --git a/gcc/testsuite/gcc.target/sh/pr54236-2.c b/gcc/testsuite/gcc.target/sh/pr54236-2.c
index b94c2c0..c72afb9 100644
--- a/gcc/testsuite/gcc.target/sh/pr54236-2.c
+++ b/gcc/testsuite/gcc.target/sh/pr54236-2.c
@@ -133,7 +133,7 @@ int
test_016 (int a, int b, int c, int d)
{
// non-SH2A: 1x add #1, 1x mov #-2, 1x and
- // SH2A: 1x add #1, 1x blcr #0
+ // SH2A: 1x add #1, 1x bclr #0
return a + (a & 1);
}