diff options
Diffstat (limited to 'gcc/omp-low.c')
-rw-r--r-- | gcc/omp-low.c | 32 |
1 files changed, 14 insertions, 18 deletions
diff --git a/gcc/omp-low.c b/gcc/omp-low.c index adbd0eb..e70970e 100644 --- a/gcc/omp-low.c +++ b/gcc/omp-low.c @@ -3421,24 +3421,20 @@ lower_rec_input_clauses (tree clauses, gimple_seq *ilist, gimple_seq *dlist, OMP_CLAUSE__LOOPTEMP_); gcc_assert (c); tree l = OMP_CLAUSE_DECL (c); - if (fd->collapse == 1) - { - tree n1 = fd->loop.n1; - tree step = fd->loop.step; - tree itype = TREE_TYPE (l); - if (POINTER_TYPE_P (itype)) - itype = signed_type_for (itype); - l = fold_build2 (MINUS_EXPR, itype, l, n1); - if (TYPE_UNSIGNED (itype) - && fd->loop.cond_code == GT_EXPR) - l = fold_build2 (TRUNC_DIV_EXPR, itype, - fold_build1 (NEGATE_EXPR, - itype, l), - fold_build1 (NEGATE_EXPR, - itype, step)); - else - l = fold_build2 (TRUNC_DIV_EXPR, itype, l, step); - } + tree n1 = fd->loop.n1; + tree step = fd->loop.step; + tree itype = TREE_TYPE (l); + if (POINTER_TYPE_P (itype)) + itype = signed_type_for (itype); + l = fold_build2 (MINUS_EXPR, itype, l, n1); + if (TYPE_UNSIGNED (itype) + && fd->loop.cond_code == GT_EXPR) + l = fold_build2 (TRUNC_DIV_EXPR, itype, + fold_build1 (NEGATE_EXPR, itype, l), + fold_build1 (NEGATE_EXPR, + itype, step)); + else + l = fold_build2 (TRUNC_DIV_EXPR, itype, l, step); t = fold_build2 (MULT_EXPR, stept, fold_convert (stept, l), t); if (POINTER_TYPE_P (TREE_TYPE (x))) |