]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
graphite.c (stmt_simple_for_scop_p): Also handle cases when gimple_call_lhs is NULL.
authorSebastian Pop <sebastian.pop@amd.com>
Tue, 20 Jan 2009 14:58:53 +0000 (14:58 +0000)
committerSebastian Pop <spop@gcc.gnu.org>
Tue, 20 Jan 2009 14:58:53 +0000 (14:58 +0000)
2009-01-20  Sebastian Pop  <sebastian.pop@amd.com>

* graphite.c (stmt_simple_for_scop_p): Also handle cases when
gimple_call_lhs is NULL.

From-SVN: r143517

gcc/ChangeLog
gcc/graphite.c

index 20215dcfad0eb4ab13b8c7e502605be3a029c3d4..4faf8450abebe8a2041d790736ddfa7dedc813c3 100644 (file)
@@ -1,3 +1,8 @@
+2009-01-20  Sebastian Pop  <sebastian.pop@amd.com>
+
+       * graphite.c (stmt_simple_for_scop_p): Also handle cases when
+       gimple_call_lhs is NULL.
+
 2008-01-20  Paolo Bonzini  <bonzini@gnu.org>
 
        PR target/38868
index 5377d724b9be6654d7ba41178be82c381c08517b..f169f7252906d0a46bc2a2852c8bf1f7028b18ec 100644 (file)
@@ -1040,14 +1040,12 @@ stmt_simple_for_scop_p (basic_block scop_entry, gimple stmt)
        size_t n = gimple_call_num_args (stmt);
        tree lhs = gimple_call_lhs (stmt);
 
-       for (i = 0; i < n; i++)
-         {
-           tree arg = gimple_call_arg (stmt, i);
+       if (lhs && !is_simple_operand (loop, stmt, lhs))
+         return false;
 
-           if (!(is_simple_operand (loop, stmt, lhs)
-                 && is_simple_operand (loop, stmt, arg)))
-             return false;
-         }
+       for (i = 0; i < n; i++)
+         if (!is_simple_operand (loop, stmt, gimple_call_arg (stmt, i)))
+           return false;
 
        return true;
       }