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.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/gcc/tree-predcom.c b/gcc/tree-predcom.c
index 712cc68..be2cfc4 100644
--- a/gcc/tree-predcom.c
+++ b/gcc/tree-predcom.c
@@ -829,7 +829,7 @@ suitable_component_p (struct loop *loop, struct component *comp)
gcc_assert (dominated_by_p (CDI_DOMINATORS, ba, bp));
bp = ba;
- if (!DR_IS_READ (a->ref))
+ if (DR_IS_WRITE (a->ref))
has_write = true;
}
@@ -1197,7 +1197,7 @@ determine_roots_comp (struct loop *loop,
FOR_EACH_VEC_ELT (dref, comp->refs, i, a)
{
- if (!chain || !DR_IS_READ (a->ref)
+ if (!chain || DR_IS_WRITE (a->ref)
|| double_int_ucmp (uhwi_to_double_int (MAX_DISTANCE),
double_int_sub (a->offset, last_ofs)) <= 0)
{
@@ -1611,7 +1611,7 @@ execute_load_motion (struct loop *loop, chain_p chain, bitmap tmp_vars)
gcc_assert (chain->type == CT_INVARIANT);
gcc_assert (!chain->combined);
FOR_EACH_VEC_ELT (dref, chain->refs, i, a)
- if (!DR_IS_READ (a->ref))
+ if (DR_IS_WRITE (a->ref))
n_writes++;
/* If there are no reads in the loop, there is nothing to do. */
@@ -1627,7 +1627,7 @@ execute_load_motion (struct loop *loop, chain_p chain, bitmap tmp_vars)
bool is_read = DR_IS_READ (a->ref);
mark_virtual_ops_for_renaming (a->stmt);
- if (!DR_IS_READ (a->ref))
+ if (DR_IS_WRITE (a->ref))
{
n_writes--;
if (n_writes)