diff options
Diffstat (limited to 'gcc/omp-low.c')
-rw-r--r-- | gcc/omp-low.c | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/gcc/omp-low.c b/gcc/omp-low.c index 3f7debf1fd1..bf52d849d9e 100644 --- a/gcc/omp-low.c +++ b/gcc/omp-low.c @@ -1120,7 +1120,8 @@ maybe_lookup_field (tree var, omp_context *ctx) static bool use_pointer_for_field (tree decl, omp_context *shared_ctx) { - if (AGGREGATE_TYPE_P (TREE_TYPE (decl))) + if (AGGREGATE_TYPE_P (TREE_TYPE (decl)) + || TYPE_ATOMIC (TREE_TYPE (decl))) return true; /* We can only use copy-in/copy-out semantics for shared variables @@ -4301,7 +4302,9 @@ lower_rec_simd_input_clauses (tree new_var, omp_context *ctx, int &max_vf, { tree c = find_omp_clause (gimple_omp_for_clauses (ctx->stmt), OMP_CLAUSE_SAFELEN); - if (c && TREE_CODE (OMP_CLAUSE_SAFELEN_EXPR (c)) != INTEGER_CST) + if (c + && (TREE_CODE (OMP_CLAUSE_SAFELEN_EXPR (c)) != INTEGER_CST + || tree_int_cst_sgn (OMP_CLAUSE_SAFELEN_EXPR (c)) != 1)) max_vf = 1; else if (c && compare_tree_int (OMP_CLAUSE_SAFELEN_EXPR (c), max_vf) == -1) @@ -19449,7 +19452,7 @@ oacc_loop_fixed_partitions (oacc_loop *loop, unsigned outer_mask) } else { - unsigned outermost = this_mask & -this_mask; + unsigned outermost = least_bit_hwi (this_mask); if (outermost && outermost <= outer_mask) { @@ -19530,7 +19533,7 @@ oacc_loop_auto_partitions (oacc_loop *loop, unsigned outer_mask) /* Determine the outermost partitioning used within this loop. */ this_mask = loop->inner | GOMP_DIM_MASK (GOMP_DIM_MAX); - this_mask = (this_mask & -this_mask); + this_mask = least_bit_hwi (this_mask); /* Pick the partitioning just inside that one. */ this_mask >>= 1; |