aboutsummaryrefslogtreecommitdiff
path: root/gcc/emit-rtl.c
diff options
context:
space:
mode:
authorJakub Jelinek <jakub@redhat.com>2016-12-02 09:44:42 +0100
committerJakub Jelinek <jakub@gcc.gnu.org>2016-12-02 09:44:42 +0100
commit60ebe8ce1d029cbff8ef80c967f98ba43d746f3b (patch)
treed0c90b780983a3a4c1d8282028a2bf718f76ca35 /gcc/emit-rtl.c
parenta717444986a981b21b42fccfd982dcb6ebe42254 (diff)
downloadgcc-60ebe8ce1d029cbff8ef80c967f98ba43d746f3b.zip
gcc-60ebe8ce1d029cbff8ef80c967f98ba43d746f3b.tar.gz
gcc-60ebe8ce1d029cbff8ef80c967f98ba43d746f3b.tar.bz2
re PR rtl-optimization/78547 (ICE: in loc_cmp, at var-tracking.c:3417 with -Os -g -mstringop-strategy=libcall -freorder-blocks-algorithm=simple)
PR rtl-optimization/78547 * emit-rtl.c (unshare_all_rtl): Make sure DECL_RTL and DECL_INCOMING_RTL is not shared. * config/i386/i386.c (convert_scalars_to_vectors): If any insns have been converted, adjust all parameter's DEC_RTL and DECL_INCOMING_RTL back from V1TImode to TImode if the parameters have TImode. * gcc.dg/pr78547.c: New test. From-SVN: r243165
Diffstat (limited to 'gcc/emit-rtl.c')
-rw-r--r--gcc/emit-rtl.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/gcc/emit-rtl.c b/gcc/emit-rtl.c
index 02512d3..d2ac88b 100644
--- a/gcc/emit-rtl.c
+++ b/gcc/emit-rtl.c
@@ -2668,6 +2668,14 @@ unsigned int
unshare_all_rtl (void)
{
unshare_all_rtl_1 (get_insns ());
+
+ for (tree decl = DECL_ARGUMENTS (cfun->decl); decl; decl = DECL_CHAIN (decl))
+ {
+ if (DECL_RTL_SET_P (decl))
+ SET_DECL_RTL (decl, copy_rtx_if_shared (DECL_RTL (decl)));
+ DECL_INCOMING_RTL (decl) = copy_rtx_if_shared (DECL_INCOMING_RTL (decl));
+ }
+
return 0;
}