]> git.ipfire.org Git - thirdparty/gcc.git/commit - gcc/tree-ssa-ccp.c
2015-04-21 Richard Biener <rguenther@suse.de>
authorrguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 21 Apr 2015 12:52:43 +0000 (12:52 +0000)
committerrguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 21 Apr 2015 12:52:43 +0000 (12:52 +0000)
commitfc6cc27b3f46a6f70f610ec93a1c5e68d83c933b
tree2360651c91e90b4d553f511d0ad13639ea0d08ca
parent4c9206f2fac3553376254959bdab5d1a03e5be52
2015-04-21  Richard Biener  <rguenther@suse.de>

PR tree-optimization/65650
* tree-ssa-ccp.c (valid_lattice_transition): Allow lattice
transitions involving copies.
(set_lattice_value): Adjust for copy lattice state.
(ccp_lattice_meet): Do not merge UNDEFINED and a copy to the copy
if that doesn't dominate the merge point.
(bit_value_unop): Adjust what we treat as varying mask.
(bit_value_binop): Likewise.
(bit_value_assume_aligned): Likewise.
(evaluate_stmt): When we simplified to a SSA name record a copy
instead of dropping to varying.
(visit_assignment): Simplify.

* gimple-match.h (gimple_simplify): Add another callback.
* gimple-fold.c (fold_stmt_1): Adjust caller.
(gimple_fold_stmt_to_constant_1): Likewise - pass valueize
for the 2nd callback.
* gimple-match-head.c (gimple_simplify): Add a callback that is
used to valueize the stmt operands and use it that way.

* gcc.dg/tree-ssa/ssa-ccp-37.c: New testcase.
* gcc.dg/tree-ssa/forwprop-11.c: Adjust.
* gcc.dg/tree-ssa/ssa-fre-3.c: Likewise.
* gcc.dg/tree-ssa/ssa-fre-4.c: Likewise.
* gcc.dg/tree-ssa/ssa-fre-5.c: Likewise.
* gcc.dg/tree-ssa/ssa-fre-32.c: Likewise.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@222267 138bc75d-0d04-0410-961f-82ee72b054a4
12 files changed:
gcc/ChangeLog
gcc/gimple-fold.c
gcc/gimple-match-head.c
gcc/gimple-match.h
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.dg/tree-ssa/forwprop-11.c
gcc/testsuite/gcc.dg/tree-ssa/ssa-ccp-37.c [new file with mode: 0644]
gcc/testsuite/gcc.dg/tree-ssa/ssa-fre-3.c
gcc/testsuite/gcc.dg/tree-ssa/ssa-fre-32.c
gcc/testsuite/gcc.dg/tree-ssa/ssa-fre-4.c
gcc/testsuite/gcc.dg/tree-ssa/ssa-fre-5.c
gcc/tree-ssa-ccp.c