diff options
author | Jakub Jelinek <jakub@redhat.com> | 2016-06-24 20:44:11 +0200 |
---|---|---|
committer | Jakub Jelinek <jakub@gcc.gnu.org> | 2016-06-24 20:44:11 +0200 |
commit | 37e373c2b825584243f3d67a31263e5a0f7b9d15 (patch) | |
tree | 28b364b7658b39d19c00f3b705d77688098b4eb6 /gcc/omp-low.c | |
parent | de86ff8f97fa7352f4be371b053f7c3dcd4290c0 (diff) | |
download | gcc-37e373c2b825584243f3d67a31263e5a0f7b9d15.zip gcc-37e373c2b825584243f3d67a31263e5a0f7b9d15.tar.gz gcc-37e373c2b825584243f3d67a31263e5a0f7b9d15.tar.bz2 |
re PR tree-optimization/71647 (aligned(x:32) in #pragma omp simd does not work)
PR tree-optimization/71647
* omp-low.c (lower_rec_input_clauses): Convert
omp_clause_aligned_alignment (c) to size_type_node for the
last argument of __builtin_assume_aligned.
* gcc.target/i386/pr71647.c: New test.
From-SVN: r237769
Diffstat (limited to 'gcc/omp-low.c')
-rw-r--r-- | gcc/omp-low.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/gcc/omp-low.c b/gcc/omp-low.c index 22e5909..b89978f 100644 --- a/gcc/omp-low.c +++ b/gcc/omp-low.c @@ -4475,8 +4475,9 @@ lower_rec_input_clauses (tree clauses, gimple_seq *ilist, gimple_seq *dlist, if (new_var == NULL_TREE) new_var = maybe_lookup_decl_in_outer_ctx (var, ctx); x = builtin_decl_explicit (BUILT_IN_ASSUME_ALIGNED); - x = build_call_expr_loc (clause_loc, x, 2, new_var, - omp_clause_aligned_alignment (c)); + tree alarg = omp_clause_aligned_alignment (c); + alarg = fold_convert_loc (clause_loc, size_type_node, alarg); + x = build_call_expr_loc (clause_loc, x, 2, new_var, alarg); x = fold_convert_loc (clause_loc, TREE_TYPE (new_var), x); x = build2 (MODIFY_EXPR, TREE_TYPE (new_var), new_var, x); gimplify_and_add (x, ilist); @@ -4489,8 +4490,9 @@ lower_rec_input_clauses (tree clauses, gimple_seq *ilist, gimple_seq *dlist, t = maybe_lookup_decl_in_outer_ctx (var, ctx); t = build_fold_addr_expr_loc (clause_loc, t); t2 = builtin_decl_explicit (BUILT_IN_ASSUME_ALIGNED); - t = build_call_expr_loc (clause_loc, t2, 2, t, - omp_clause_aligned_alignment (c)); + tree alarg = omp_clause_aligned_alignment (c); + alarg = fold_convert_loc (clause_loc, size_type_node, alarg); + t = build_call_expr_loc (clause_loc, t2, 2, t, alarg); t = fold_convert_loc (clause_loc, ptype, t); x = create_tmp_var (ptype); t = build2 (MODIFY_EXPR, ptype, x, t); |