tree-ssa-loop-ivopts.c (get_computation_cost_at): Check inv expression pointer, not...
authorBin Cheng <bin.cheng@arm.com>
Wed, 18 May 2016 10:41:28 +0000 (10:41 +0000)
committerBin Cheng <amker@gcc.gnu.org>
Wed, 18 May 2016 10:41:28 +0000 (10:41 +0000)
* tree-ssa-loop-ivopts.c (get_computation_cost_at): Check inv
expression pointer, not pointer to the pointer.

From-SVN: r236371

gcc/ChangeLog
gcc/tree-ssa-loop-ivopts.c

index f3f6d38b9cfcb94aad3726482473915c50ee4e6d..a011528db7c7256d1559943a1e2d48abefc75372 100644 (file)
@@ -1,3 +1,8 @@
+2016-05-18 Bin Cheng  <bin.cheng@arm.com>
+
+       * tree-ssa-loop-ivopts.c (get_computation_cost_at): Check invariant
+       expression pointer, not pointer to the pointer.
+
 2016-05-18  Jakub Jelinek  <jakub@redhat.com>
 
        * config/i386/sse.md (pbroadcast_evex_isa): New mode attr.
index e8953a05b0b708340dfd91d4a9f940c648c74b39..9ce6b64951976ee4583a9fda89cace8336a2a294 100644 (file)
@@ -4874,7 +4874,7 @@ get_computation_cost_at (struct ivopts_data *data,
       *inv_expr = get_loop_invariant_expr (data, ubase, cbase, ratio,
                                           address_p);
       /* Clear depends on.  */
-      if (inv_expr != NULL)
+      if (*inv_expr != NULL)
        bitmap_clear (*depends_on);
     }