Skip to content
Snippets Groups Projects
Commit 203b127f authored by Richard Biener's avatar Richard Biener
Browse files

Restore CCP copy propagation

The following restores copy propagation in CCP for the case the
lattice was constant before trying to transition to a copy.  At
some point we changed to use the meet operator to handle
integer constant -> integer constant transitions but that screws
up the const -> copy lattice transition.

	PR tree-optimization/84646
	* tree-ssa-ccp.cc (set_lattice_value): Make sure we
	allow a const -> copy transition and avoid using meet
	in that case.

	* gcc.dg/tree-ssa/ssa-ccp-42.c: New testcase.
parent bd044dae
No related branches found
No related tags found
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment