aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree-ssa-address.c
diff options
context:
space:
mode:
authorRichard Biener <rguenther@suse.de>2020-08-27 14:21:33 +0200
committerRichard Biener <rguenther@suse.de>2020-09-01 11:52:10 +0200
commitd6a05b494b4b714e996a5ca09c5a4a1c41dbd648 (patch)
tree0d9de018722a2f47b0fb13e01dd9ecc7439514a2 /gcc/tree-ssa-address.c
parenta37b0cccf4965f13006d2928f57a71e46e341cf8 (diff)
downloadgcc-d6a05b494b4b714e996a5ca09c5a4a1c41dbd648.zip
gcc-d6a05b494b4b714e996a5ca09c5a4a1c41dbd648.tar.gz
gcc-d6a05b494b4b714e996a5ca09c5a4a1c41dbd648.tar.bz2
rtl-optimization/96812 - remap dependence info on RTL loop unrolling
This carries over the PR87609 fix also to RTL loop unrolling. The gcc.dg/torture/pr90328.c testcase otherwise is miscompiled with the tree-ssa-address.c hunk (or alternatively with -fno-ivopts on master). I've tried to find the correct abstraction and adjusted two other duplicate_insn_chain users for which I do not have testcases. There may be other insn-chain copying routines that could be affected but hopefully most appropriately go through CFG hooks. 2020-08-27 Richard Biener <rguenther@suse.de> PR rtl-optimization/96812 * tree-ssa-address.c (copy_ref_info): Also copy dependence info. * cfgrtl.h (duplicate_insn_chain): Adjust prototype. * cfgrtl.c (duplicate_insn_chain): Remap dependence info if requested. (cfg_layout_duplicate_bb): Make sure we remap dependence info. * modulo-sched.c (duplicate_insns_of_cycles): Remap dependence info. (generate_prolog_epilog): Adjust. * config/c6x/c6x.c (hwloop_optimize): Remap dependence info.
Diffstat (limited to 'gcc/tree-ssa-address.c')
-rw-r--r--gcc/tree-ssa-address.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/gcc/tree-ssa-address.c b/gcc/tree-ssa-address.c
index 93eae19..baf495a 100644
--- a/gcc/tree-ssa-address.c
+++ b/gcc/tree-ssa-address.c
@@ -1044,6 +1044,16 @@ copy_ref_info (tree new_ref, tree old_ref)
}
}
+ /* We can transfer dependence info. */
+ if (!MR_DEPENDENCE_CLIQUE (new_ref)
+ && (TREE_CODE (base) == MEM_REF
+ || TREE_CODE (base) == TARGET_MEM_REF)
+ && MR_DEPENDENCE_CLIQUE (base))
+ {
+ MR_DEPENDENCE_CLIQUE (new_ref) = MR_DEPENDENCE_CLIQUE (base);
+ MR_DEPENDENCE_BASE (new_ref) = MR_DEPENDENCE_BASE (base);
+ }
+
/* And alignment info. Note we cannot transfer misalignment info
since that sits on the SSA name but this is flow-sensitive info
which we cannot transfer in this generic routine. */