Commit 5bfd2f9b by Jakub Jelinek Committed by Jakub Jelinek

re PR tree-optimization/82954 (ICE in fold_binary_loc, at fold-const.c:9061)

	PR tree-optimization/82954
	* gimple-ssa-store-merging.c
	(imm_store_chain_info::coalesce_immediate_stores): If
	!infof->ops[N].base_addr, split group if info->ops[N].base_addr.

	* gcc.c-torture/execute/pr82954.c: New test.

From-SVN: r254671
parent 441b4d0f
2017-11-13 Jakub Jelinek <jakub@redhat.com>
PR tree-optimization/82954
* gimple-ssa-store-merging.c
(imm_store_chain_info::coalesce_immediate_stores): If
!infof->ops[N].base_addr, split group if info->ops[N].base_addr.
2017-11-13 Richard Sandiford <richard.sandiford@linaro.org>
* config/aarch64/aarch64-simd.md (aarch64_store_lane0<mode>):
......@@ -1198,10 +1198,12 @@ imm_store_chain_info::coalesce_immediate_stores ()
std::swap (info->ops[0], info->ops[1]);
info->ops_swapped_p = true;
}
if ((!infof->ops[0].base_addr
|| compatible_load_p (merged_store, info, base_addr, 0))
&& (!infof->ops[1].base_addr
|| compatible_load_p (merged_store, info, base_addr, 1)))
if ((infof->ops[0].base_addr
? compatible_load_p (merged_store, info, base_addr, 0)
: !info->ops[0].base_addr)
&& (infof->ops[1].base_addr
? compatible_load_p (merged_store, info, base_addr, 1)
: !info->ops[1].base_addr))
{
merged_store->merge_into (info);
continue;
......
2017-11-13 Jakub Jelinek <jakub@redhat.com>
PR tree-optimization/82954
* gcc.c-torture/execute/pr82954.c: New test.
2017-11-11 Janus Weil <janus@gcc.gnu.org>
PR fortran/82932
......
/* PR tree-optimization/82954 */
__attribute__((noipa)) void
foo (int *__restrict p, int *__restrict q)
{
p[0] = p[0] ^ 1;
p[1] = p[1] ^ 2;
p[2] = p[2] ^ q[2];
p[3] = p[3] ^ q[3];
}
int
main ()
{
int p[4] = { 16, 32, 64, 128 };
int q[4] = { 8, 4, 2, 1 };
asm volatile ("" : : "g" (p), "g" (q) : "memory");
foo (p, q);
if (p[0] != 17 || p[1] != 34 || p[2] != 66 || p[3] != 129)
__builtin_abort ();
return 0;
}
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