Commit cc770199 by Richard Sandiford Committed by Richard Sandiford

Fix IFN_MASK_STORE handling of IFN_GOMP_SIMD_LANE

The IFN_GOMP_SIMD_LANE handling in vectorizable_store tries to use MEM_REF
offsets to maintain pointer disambiguation info.  This patch makes sure
that we don't try to do the same optimisation for IFN_MASK_STOREs, which
have no similar offset argument.

The patch fixes libgomp.c-c++-common/pr66199-*.c for SVE.  Previously
we had an ncopies==2 store and stored both halves to the same address.

2019-01-07  Richard Sandiford  <richard.sandiford@arm.com>

gcc/
	* tree-vect-stmts.c (vectorizable_store): Don't use the dataref_offset
	optimization for masked stores.

From-SVN: r267654
parent 08c35030
2019-01-07 Richard Sandiford <richard.sandiford@arm.com> 2019-01-07 Richard Sandiford <richard.sandiford@arm.com>
* tree-vect-stmts.c (vectorizable_store): Don't use the dataref_offset
optimization for masked stores.
2019-01-07 Richard Sandiford <richard.sandiford@arm.com>
PR middle-end/88567 PR middle-end/88567
* tree-vect-loop.c (get_initial_defs_for_reduction): Pass the * tree-vect-loop.c (get_initial_defs_for_reduction): Pass the
output vector directly to duplicate_and_interleave instead of output vector directly to duplicate_and_interleave instead of
......
...@@ -7059,6 +7059,7 @@ vectorizable_store (stmt_vec_info stmt_info, gimple_stmt_iterator *gsi, ...@@ -7059,6 +7059,7 @@ vectorizable_store (stmt_vec_info stmt_info, gimple_stmt_iterator *gsi,
bool simd_lane_access_p bool simd_lane_access_p
= STMT_VINFO_SIMD_LANE_ACCESS_P (stmt_info); = STMT_VINFO_SIMD_LANE_ACCESS_P (stmt_info);
if (simd_lane_access_p if (simd_lane_access_p
&& !loop_masks
&& TREE_CODE (DR_BASE_ADDRESS (first_dr_info->dr)) == ADDR_EXPR && TREE_CODE (DR_BASE_ADDRESS (first_dr_info->dr)) == ADDR_EXPR
&& VAR_P (TREE_OPERAND (DR_BASE_ADDRESS (first_dr_info->dr), 0)) && VAR_P (TREE_OPERAND (DR_BASE_ADDRESS (first_dr_info->dr), 0))
&& integer_zerop (DR_OFFSET (first_dr_info->dr)) && integer_zerop (DR_OFFSET (first_dr_info->dr))
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment