PR tree-optimization/78821
commit9deedf62e201e437535916649b0d36ba6684248b
authorjakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4>
Mon, 13 Nov 2017 10:26:13 +0000 (13 10:26 +0000)
committerjakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4>
Mon, 13 Nov 2017 10:26:13 +0000 (13 10:26 +0000)
treec4644b84d36195da7ac02fcc2c2a4ac621c3a29f
parent7ea14e0563d164603686df7e05bbbd20810b7f80
PR tree-optimization/78821
* gimple-ssa-store-merging.c (compatible_load_p): Don't require
that bit_not_p is the same.
(imm_store_chain_info::coalesce_immediate_stores): Likewise.
(split_group): Count precisely bit_not_p bits in each statement.
(invert_op): New function.
(imm_store_chain_info::output_merged_store): Use invert_op to
emit BIT_XOR_EXPR with a xor_mask instead of BIT_NOT_EXPR if some
but not all orig_stores have BIT_NOT_EXPR in the corresponding spots.

* gcc.dg/store_merging_15.c: New test.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@254679 138bc75d-0d04-0410-961f-82ee72b054a4
gcc/ChangeLog
gcc/gimple-ssa-store-merging.c
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.dg/store_merging_15.c [new file with mode: 0644]