Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src Fix gcc PR target/64479 [SH] wrong optimization delayed-branch
details: https://anonhg.NetBSD.org/src/rev/024be6be58c0
branches: trunk
changeset: 335571:024be6be58c0
user: skrll <skrll%NetBSD.org@localhost>
date: Thu Jan 15 08:42:14 2015 +0000
description:
Fix gcc PR target/64479 [SH] wrong optimization delayed-branch
diffstat:
external/gpl3/gcc/dist/gcc/ChangeLog | 8 ++++++++
external/gpl3/gcc/dist/gcc/rtlanal.c | 13 ++++++++++++-
tools/gcc/gcc-version.mk | 4 ++--
3 files changed, 22 insertions(+), 3 deletions(-)
diffs (56 lines):
diff -r 779357871e13 -r 024be6be58c0 external/gpl3/gcc/dist/gcc/ChangeLog
--- a/external/gpl3/gcc/dist/gcc/ChangeLog Wed Jan 14 22:57:27 2015 +0000
+++ b/external/gpl3/gcc/dist/gcc/ChangeLog Thu Jan 15 08:42:14 2015 +0000
@@ -1,3 +1,11 @@
+2015-01-13 Oleg Endo <olegendo%gcc.gnu.org@localhost>
+
+ Backport form mainline
+ 2015-01-13 Oleg Endo <olegendo%gcc.gnu.org@localhost>
+
+ PR target/64479
+ * rtlanal.c (set_reg_p): Handle SEQUENCE constructs.
+
2014-12-19 Release Manager
* GCC 4.8.4 released.
diff -r 779357871e13 -r 024be6be58c0 external/gpl3/gcc/dist/gcc/rtlanal.c
--- a/external/gpl3/gcc/dist/gcc/rtlanal.c Wed Jan 14 22:57:27 2015 +0000
+++ b/external/gpl3/gcc/dist/gcc/rtlanal.c Thu Jan 15 08:42:14 2015 +0000
@@ -873,6 +873,17 @@
int
reg_set_p (const_rtx reg, const_rtx insn)
{
+ /* After delay slot handling, call and branch insns might be in a
+ sequence. Check all the elements there. */
+ if (INSN_P (insn) && GET_CODE (PATTERN (insn)) == SEQUENCE)
+ {
+ for (int i = 0; i < XVECLEN (PATTERN (insn), 0); ++i)
+ if (reg_set_p (reg, XVECEXP (PATTERN (insn), 0, i)))
+ return true;
+
+ return false;
+ }
+
/* We can be passed an insn or part of one. If we are passed an insn,
check if a side-effect of the insn clobbers REG. */
if (INSN_P (insn)
@@ -884,7 +895,7 @@
GET_MODE (reg), REGNO (reg)))
|| MEM_P (reg)
|| find_reg_fusage (insn, CLOBBER, reg)))))
- return 1;
+ return true;
return set_of (reg, insn) != NULL_RTX;
}
diff -r 779357871e13 -r 024be6be58c0 tools/gcc/gcc-version.mk
--- a/tools/gcc/gcc-version.mk Wed Jan 14 22:57:27 2015 +0000
+++ b/tools/gcc/gcc-version.mk Thu Jan 15 08:42:14 2015 +0000
@@ -1,5 +1,5 @@
-# $NetBSD: gcc-version.mk,v 1.2 2014/10/20 08:37:30 skrll Exp $
+# $NetBSD: gcc-version.mk,v 1.3 2015/01/15 08:42:14 skrll Exp $
# common location for tools and native build
-NETBSD_GCC_VERSION=nb1 20141012
+NETBSD_GCC_VERSION=nb2 20150115
Home |
Main Index |
Thread Index |
Old Index