]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
Check the if-convertibility of phi nodes in non predicated BBs.
authorspop <spop@138bc75d-0d04-0410-961f-82ee72b054a4>
Fri, 28 May 2010 18:38:06 +0000 (18:38 +0000)
committerspop <spop@138bc75d-0d04-0410-961f-82ee72b054a4>
Fri, 28 May 2010 18:38:06 +0000 (18:38 +0000)
2010-05-28  Sebastian Pop  <sebastian.pop@amd.com>

PR middle-end/44293
* tree-if-conv.c (if_convertible_loop_p): Check the
if-convertibility of phi nodes in non predicated BBs.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@159990 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/ChangeLog
gcc/tree-if-conv.c

index 46345e155293f1af62bb12a2157135708f9344a9..bd8239ee80a4517c5f8833886f92abf0aefa084b 100644 (file)
@@ -1,3 +1,9 @@
+2010-05-28  Sebastian Pop  <sebastian.pop@amd.com>
+
+       PR middle-end/44293
+       * tree-if-conv.c (if_convertible_loop_p): Check the
+       if-convertibility of phi nodes in non predicated BBs.
+
 2010-05-28  Joseph Myers  <joseph@codesourcery.com>
 
        * gcc.c (error, warning, inform): Remove duplicate ": " in output.
index 8dc1de682be2ab1ea354e50fc12a1d20888e9318..c338ecbe6f02f24c337f59e32e4587d74043dc22 100644 (file)
@@ -693,6 +693,10 @@ if_convertible_loop_p (struct loop *loop)
       basic_block bb = ifc_bbs[i];
       gimple_stmt_iterator itr;
 
+      for (itr = gsi_start_phis (bb); !gsi_end_p (itr); gsi_next (&itr))
+       if (!if_convertible_phi_p (loop, bb, gsi_stmt (itr)))
+         return false;
+
       /* For non predicated BBs, don't check their statements.  */
       if (!is_predicated (bb))
        continue;
@@ -700,10 +704,6 @@ if_convertible_loop_p (struct loop *loop)
       for (itr = gsi_start_bb (bb); !gsi_end_p (itr); gsi_next (&itr))
        if (!if_convertible_stmt_p (loop, bb, gsi_stmt (itr)))
          return false;
-
-      for (itr = gsi_start_phis (bb); !gsi_end_p (itr); gsi_next (&itr))
-       if (!if_convertible_phi_p (loop, bb, gsi_stmt (itr)))
-         return false;
     }
 
   if (dump_file)