mirror of git://gcc.gnu.org/git/gcc.git
Handle POINTER_TYPE_P in EVRP
Handle POINTER_TYPE_P in EVRP gcc/ChangeLog: 2016-10-06 Kugan Vivekanandarajah <kuganv@linaro.org> * tree-vrp.c (evrp_dom_walker::before_dom_children): Handle POINTER_TYPE_P. gcc/testsuite/ChangeLog: 2016-10-06 Kugan Vivekanandarajah <kuganv@linaro.org> * gcc.dg/tree-ssa/evrp4.c: New test. From-SVN: r240841
This commit is contained in:
parent
4c4430e390
commit
65b25c9b43
|
|
@ -1,3 +1,8 @@
|
|||
2016-10-06 Kugan Vivekanandarajah <kuganv@linaro.org>
|
||||
|
||||
* tree-vrp.c (evrp_dom_walker::before_dom_children): Handle
|
||||
POINTER_TYPE_P.
|
||||
|
||||
2016-10-05 Jeff Law <law@redhat.com>
|
||||
|
||||
PR tree-optimization/71661
|
||||
|
|
|
|||
|
|
@ -1,3 +1,7 @@
|
|||
2016-10-06 Kugan Vivekanandarajah <kuganv@linaro.org>
|
||||
|
||||
* gcc.dg/tree-ssa/evrp4.c: New test.
|
||||
|
||||
2016-10-06 Jeff Law <law@redhat.com>
|
||||
|
||||
PR tree-optimization/71661
|
||||
|
|
|
|||
|
|
@ -0,0 +1,20 @@
|
|||
/* { dg-do compile } */
|
||||
/* { dg-options "-O2 -fdump-tree-evrp" } */
|
||||
|
||||
int foo (int *p);
|
||||
|
||||
struct st
|
||||
{
|
||||
int a;
|
||||
int b;
|
||||
};
|
||||
|
||||
int bar (struct st *s)
|
||||
{
|
||||
|
||||
if (!s)
|
||||
return 0;
|
||||
foo (&s->a);
|
||||
}
|
||||
|
||||
/* { dg-final { scan-tree-dump "\~\\\[0B, 0B\\\]" "evrp" } } */
|
||||
|
|
@ -10666,7 +10666,8 @@ evrp_dom_walker::before_dom_children (basic_block bb)
|
|||
&& gimple_code (stmt) == GIMPLE_COND
|
||||
&& (op0 = gimple_cond_lhs (stmt))
|
||||
&& TREE_CODE (op0) == SSA_NAME
|
||||
&& INTEGRAL_TYPE_P (TREE_TYPE (gimple_cond_lhs (stmt))))
|
||||
&& (INTEGRAL_TYPE_P (TREE_TYPE (gimple_cond_lhs (stmt)))
|
||||
|| POINTER_TYPE_P (TREE_TYPE (gimple_cond_lhs (stmt)))))
|
||||
{
|
||||
/* Entering a new scope. Try to see if we can find a VR
|
||||
here. */
|
||||
|
|
|
|||
Loading…
Reference in New Issue