forked from gcc-mirror/gcc
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
gcc/ChangeLog: 2016-10-21 Kugan Vivekanandarajah <kuganv@linaro.org> * ipa-prop.c (ipa_compute_jump_functions_for_edge): Create nonzero value range for pointers in more cases. gcc/testsuite/ChangeLog: 2016-10-21 Kugan Vivekanandarajah <kuganv@linaro.org> * gcc.dg/ipa/vrp5.c: New test. * gcc.dg/ipa/vrp6.c: New test. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@241428 138bc75d-0d04-0410-961f-82ee72b054a4
- Loading branch information
kugan
committed
Oct 21, 2016
1 parent
e318c42
commit 6cb5d05
Showing
5 changed files
with
86 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
/* { dg-do compile } */ | ||
/* { dg-options "-O2 -fdump-ipa-cp-details -fdump-tree-vrp1" } */ | ||
|
||
static __attribute__((noinline, noclone)) | ||
int foo (int *p) | ||
{ | ||
if (!p) | ||
return 0; | ||
*p = 1; | ||
} | ||
|
||
struct st | ||
{ | ||
int a; | ||
int b; | ||
}; | ||
|
||
int arr1[10]; | ||
int a; | ||
int bar (struct st *s) | ||
{ | ||
int arr2[10]; | ||
int b; | ||
if (!s) | ||
return 0; | ||
foo (&s->a); | ||
foo (&a); | ||
foo (&b); | ||
foo (&arr1[1]); | ||
foo (&arr2[1]); | ||
} | ||
|
||
/* { dg-final { scan-ipa-dump "Setting nonnull for 0" "cp" } } */ | ||
/* { dg-final { scan-tree-dump-times "if" 1 "vrp1" } } */ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
/* { dg-do compile } */ | ||
/* { dg-options "-O2 -fdump-ipa-cp-details -fdump-tree-vrp1" } */ | ||
|
||
static __attribute__((noinline, noclone)) | ||
int foo (int *p) | ||
{ | ||
if (!p) | ||
return 0; | ||
*p = 1; | ||
} | ||
|
||
struct st | ||
{ | ||
int a; | ||
int b; | ||
}; | ||
|
||
struct st s2; | ||
int a; | ||
int bar (struct st *s) | ||
{ | ||
struct st s3; | ||
int b; | ||
if (!s) | ||
return 0; | ||
foo (&s->a); | ||
foo (&s2.a); | ||
foo (&s3.a); | ||
foo (&a); | ||
foo (&b); | ||
} | ||
|
||
/* { dg-final { scan-ipa-dump "Setting nonnull for 0" "cp" } } */ | ||
/* { dg-final { scan-tree-dump-times "if" 1 "vrp1" } } */ |