]> gcc.gnu.org Git - gcc.git/commitdiff
Call scev_analyzable_p only on is_gimple_reg.
authorSebastian Pop <sebastian.pop@amd.com>
Wed, 11 Aug 2010 20:29:51 +0000 (20:29 +0000)
committerSebastian Pop <spop@gcc.gnu.org>
Wed, 11 Aug 2010 20:29:51 +0000 (20:29 +0000)
2010-07-26  Sebastian Pop  <sebastian.pop@amd.com>

* graphite-sese-to-poly.c
(rewrite_commutative_reductions_out_of_ssa_loop): Call
scev_analyzable_p only on is_gimple_reg

* gcc.dg/graphite/id-25.c: New.

From-SVN: r163158

gcc/ChangeLog
gcc/ChangeLog.graphite
gcc/graphite-sese-to-poly.c
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.dg/graphite/id-25.c [new file with mode: 0644]

index aa87d604ef3fbe1f18bd519c29738d5454456c05..92cae3887ba243e1246550b04dac8085381ee292 100644 (file)
@@ -1,3 +1,9 @@
+2010-08-02  Sebastian Pop  <sebastian.pop@amd.com>
+
+       * graphite-sese-to-poly.c
+       (rewrite_commutative_reductions_out_of_ssa_loop): Call
+       scev_analyzable_p only on is_gimple_reg
+
 2010-08-02  Sebastian Pop  <sebastian.pop@amd.com>
 
        * graphite-sese-to-poly.c (propagate_expr_outside_region): New.
index 0ed18ef8a5321637e4756f8a9ae5ffbd911c7e3a..65607ec3054bd58d7d95d41762246070295b2cdc 100644 (file)
@@ -1,3 +1,11 @@
+2010-07-26  Sebastian Pop  <sebastian.pop@amd.com>
+
+       * graphite-sese-to-poly.c
+       (rewrite_commutative_reductions_out_of_ssa_loop): Call
+       scev_analyzable_p only on is_gimple_reg
+
+       * gcc.dg/graphite/id-25.c: New.
+
 2010-07-22  Sebastian Pop  <sebastian.pop@amd.com>
 
        * graphite-sese-to-poly.c (propagate_expr_outside_region): New.
index 574a25b221362be8edc96dd027b758e9d70212d0..ae8518f698155dca4533eb71e240bb0311568bf4 100644 (file)
@@ -2950,12 +2950,15 @@ rewrite_commutative_reductions_out_of_ssa_loop (loop_p loop,
 {
   gimple_stmt_iterator gsi;
   edge exit = single_exit (loop);
+  tree res;
 
   if (!exit)
     return;
 
   for (gsi = gsi_start_phis (exit->dest); !gsi_end_p (gsi); gsi_next (&gsi))
-    if (!scev_analyzable_p (gimple_phi_result (gsi_stmt (gsi)), region))
+    if ((res = gimple_phi_result (gsi_stmt (gsi)))
+       && is_gimple_reg (res)
+       && !scev_analyzable_p (res, region))
       rewrite_commutative_reductions_out_of_ssa_close_phi (gsi_stmt (gsi),
                                                           reductions);
 }
index d1c803610e11b71ee45dbd66b0b256e005038080..a3d5f7e258e89f4dfb808aba46351b03a86dbb78 100644 (file)
@@ -1,3 +1,7 @@
+2010-08-02  Sebastian Pop  <sebastian.pop@amd.com>
+
+       * gcc.dg/graphite/id-25.c: New.
+
 2010-08-02  Sebastian Pop  <sebastian.pop@amd.com>
 
        * gcc.dg/graphite/run-id-5.c: New.
diff --git a/gcc/testsuite/gcc.dg/graphite/id-25.c b/gcc/testsuite/gcc.dg/graphite/id-25.c
new file mode 100644 (file)
index 0000000..b719972
--- /dev/null
@@ -0,0 +1,34 @@
+typedef struct
+{
+  int mvd[2][(16/4)][(16/4)][2];
+} Macroblock;
+typedef struct
+{
+  int part_size[8][2];
+} InputParameters;
+typedef struct
+{
+  Macroblock *mb_data;
+  short****** pred_mv;
+  short****** all_mv;
+} ImageParameters;
+extern InputParameters *input;
+extern ImageParameters *img;
+int writeMotionVector8x8 (void)
+{
+  int i, j, k, l, m;
+  int step_h = input->part_size[7][0];
+  int step_v = input->part_size[7][1];
+  Macroblock* currMB = &img->mb_data[9];
+  int refindex = 0;
+  short****** all_mv = img->all_mv;
+  short****** pred_mv = img->pred_mv;
+
+  for (k=0; k<2; k++)
+    {
+      int curr_mvd = all_mv[2][8][0][8][7][8] - pred_mv[2][7][0][8][7][0];
+      for (l=0; l < step_v; l++)
+        for (m=0; m < step_h; m++)
+          currMB->mvd[0][8][9][8] = curr_mvd;
+    }
+}
This page took 0.118442 seconds and 5 git commands to generate.