This is the mail archive of the
mailing list for the GCC project.
[Bug tree-optimization/21090] New: VRP does not notice nonzero-ness from a PHI node
- From: "kazu at cs dot umass dot edu" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 18 Apr 2005 17:39:23 -0000
- Subject: [Bug tree-optimization/21090] New: VRP does not notice nonzero-ness from a PHI node
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
int g, h;
foo (int a)
p = &g;
p = &h;
if (p != 0)
With -O2 -fno-dominator-opts, VRP does not optimize away the "if" statement.
This is because VRP does not run the propagator when it does not insert
Even if I force it to run the propagator by forcing vrp_initialize to
return true, the meet function decides that the lattice value of p
at the second "if" statement is VARYING.
I guess we can teach the meet function to generate ~[0, 0] when we meet
&g and &h.
Summary: VRP does not notice nonzero-ness from a PHI node
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: kazu at cs dot umass dot edu
CC: dnovillo at redhat dot com,gcc-bugs at gcc dot gnu dot