aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree-predcom.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/tree-predcom.c')
-rw-r--r--gcc/tree-predcom.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/gcc/tree-predcom.c b/gcc/tree-predcom.c
index a4011bf..f7a57a4 100644
--- a/gcc/tree-predcom.c
+++ b/gcc/tree-predcom.c
@@ -1069,7 +1069,9 @@ add_ref_to_chain (chain_p chain, dref ref)
chain->has_max_use_after = false;
}
- if (ref->distance == chain->length
+ /* Don't set the flag for store-store chain since there is no use. */
+ if (chain->type != CT_STORE_STORE
+ && ref->distance == chain->length
&& ref->pos > root->pos)
chain->has_max_use_after = true;