aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKaz Kojima <kkojima@gcc.gnu.org>2015-08-07 08:11:45 +0000
committerKaz Kojima <kkojima@gcc.gnu.org>2015-08-07 08:11:45 +0000
commitfa0a20e309edbcf6d0f1eb47dad4111b9ff76a35 (patch)
treebc2b0613039605c263a6dcaa052db460deb9623d
parent41b122f335435c92f9cdb393aa37274ac767d9ab (diff)
downloadgcc-fa0a20e309edbcf6d0f1eb47dad4111b9ff76a35.zip
gcc-fa0a20e309edbcf6d0f1eb47dad4111b9ff76a35.tar.gz
gcc-fa0a20e309edbcf6d0f1eb47dad4111b9ff76a35.tar.bz2
sh.c (sh_recog_treg_set_expr): Return false during expand phase to avoid codegen differences with -g.
* config/sh/sh.c (sh_recog_treg_set_expr): Return false during expand phase to avoid codegen differences with -g. From-SVN: r226715
-rw-r--r--gcc/ChangeLog6
-rw-r--r--gcc/config/sh/sh.c6
2 files changed, 12 insertions, 0 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 75b4d94..7fbacb3 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,9 @@
+2015-08-07 Kaz Kojima <kkojima@gcc.gnu.org>
+
+ PR target/67002
+ * config/sh/sh.c (sh_recog_treg_set_expr): Return false when
+ currently_expanding_to_rtl is set.
+
2015-08-06 Yaakov Selkowitz <yselkowi@redhat.com>
* configure.ac: Define LIBICONV_DEP with in-tree libiconv.
diff --git a/gcc/config/sh/sh.c b/gcc/config/sh/sh.c
index f429193..450d634 100644
--- a/gcc/config/sh/sh.c
+++ b/gcc/config/sh/sh.c
@@ -14165,6 +14165,12 @@ sh_recog_treg_set_expr (rtx op, machine_mode mode)
if (!can_create_pseudo_p ())
return false;
+ /* expand_debug_locations may call this to compute rtx costs at
+ very early stage. In that case, don't make new insns here to
+ avoid codegen differences with -g. */
+ if (currently_expanding_to_rtl)
+ return false;
+
/* We are going to invoke recog in a re-entrant way and thus
have to capture its current state and restore it afterwards. */
recog_data_d prev_recog_data = recog_data;