summaryrefslogtreecommitdiff
path: root/gcc/graphite.c
diff options
context:
space:
mode:
authorspop <spop@138bc75d-0d04-0410-961f-82ee72b054a4>2009-01-20 14:58:53 +0000
committerspop <spop@138bc75d-0d04-0410-961f-82ee72b054a4>2009-01-20 14:58:53 +0000
commitaa3f15b618953c4ce2cd3daaa09420beab1d5bb3 (patch)
tree70563f2ffb64a7dda1dc6952b1b09f91767e3ec3 /gcc/graphite.c
parent37c992af2997f05028c66083dfcc832539d9d316 (diff)
downloadgcc-aa3f15b618953c4ce2cd3daaa09420beab1d5bb3.tar.gz
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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@143517 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/graphite.c')
-rw-r--r--gcc/graphite.c12
1 files changed, 5 insertions, 7 deletions
diff --git a/gcc/graphite.c b/gcc/graphite.c
index 5377d724b9b..f169f725290 100644
--- a/gcc/graphite.c
+++ b/gcc/graphite.c
@@ -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;
}