diff options
author | Jakub Jelinek <jakub@redhat.com> | 2017-11-13 10:01:24 +0100 |
---|---|---|
committer | Jakub Jelinek <jakub@gcc.gnu.org> | 2017-11-13 10:01:24 +0100 |
commit | 5bfd2f9bc61af31a8ada151a6e841b10e37b302c (patch) | |
tree | 37ec1d953b7f19bd47f03e1a91fd708518205b53 /gcc/gimple-ssa-store-merging.c | |
parent | 441b4d0fa20992086704ebf013a4f8c3a41c96b0 (diff) |
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
Diffstat (limited to 'gcc/gimple-ssa-store-merging.c')
-rw-r--r-- | gcc/gimple-ssa-store-merging.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/gcc/gimple-ssa-store-merging.c b/gcc/gimple-ssa-store-merging.c index 40f7c9843f6..54cb86e4cc7 100644 --- a/gcc/gimple-ssa-store-merging.c +++ b/gcc/gimple-ssa-store-merging.c @@ -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; |