aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJakub Jelinek <jakub@redhat.com>2020-04-11 07:32:12 +0200
committerJakub Jelinek <jakub@redhat.com>2020-04-11 07:34:38 +0200
commita615ea71bc8fbf31b9bc71cb373a7ca5b9cca44a (patch)
treef3d5b805217e1eff345f23cd6726bd9a8c06fed1
parent47539a4acef5853f6736952c92ce9e4785d3fde4 (diff)
downloadgcc-a615ea71bc8fbf31b9bc71cb373a7ca5b9cca44a.zip
gcc-a615ea71bc8fbf31b9bc71cb373a7ca5b9cca44a.tar.gz
gcc-a615ea71bc8fbf31b9bc71cb373a7ca5b9cca44a.tar.bz2
cselib: Mark the cselib_record_sp_cfa_base_equiv VALUE as preserved [PR94551]
Sometimes the cselib_record_sp_cfa_base_equiv makes it into the var-tracking used VALUEs and needs to be preserved. 2020-04-11 Jakub Jelinek <jakub@redhat.com> PR debug/94495 PR target/94551 * cselib.c (cselib_record_sp_cfa_base_equiv): Set PRESERVED_VALUE_P on val->val_rtx.
-rw-r--r--gcc/ChangeLog7
-rw-r--r--gcc/cselib.c5
2 files changed, 11 insertions, 1 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 33e980b..f1a9568 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,10 @@
+2020-04-11 Jakub Jelinek <jakub@redhat.com>
+
+ PR debug/94495
+ PR target/94551
+ * cselib.c (cselib_record_sp_cfa_base_equiv): Set PRESERVED_VALUE_P on
+ val->val_rtx.
+
2020-04-10 Thomas Schwinge <thomas@codesourcery.com>
PR middle-end/89433
diff --git a/gcc/cselib.c b/gcc/cselib.c
index 3692feb..53e9603 100644
--- a/gcc/cselib.c
+++ b/gcc/cselib.c
@@ -2695,7 +2695,10 @@ cselib_record_sp_cfa_base_equiv (HOST_WIDE_INT offset, rtx_insn *insn)
= cselib_lookup_from_insn (plus_constant (Pmode, sp_derived_value, offset),
Pmode, 1, VOIDmode, insn);
if (val != NULL)
- cselib_record_set (stack_pointer_rtx, val, NULL);
+ {
+ PRESERVED_VALUE_P (val->val_rtx) = 1;
+ cselib_record_set (stack_pointer_rtx, val, NULL);
+ }
}
/* Return true if V is SP_DERIVED_VALUE_P (or SP_DERIVED_VALUE_P + CONST_INT)