diff options
author | vmakarov <vmakarov@138bc75d-0d04-0410-961f-82ee72b054a4> | 2018-01-24 19:45:55 +0000 |
---|---|---|
committer | vmakarov <vmakarov@138bc75d-0d04-0410-961f-82ee72b054a4> | 2018-01-24 19:45:55 +0000 |
commit | 2168623d192168433cbd9b8cb2ba4ef55d3c7f5a (patch) | |
tree | f6f3cb3dbb9fa82764baee42fef30316406158ee | |
parent | 02e955b2f245b91ccc33f6ef5fc20ced17be2b68 (diff) | |
download | gcc-2168623d192168433cbd9b8cb2ba4ef55d3c7f5a.tar.gz |
2018-01-24 Vladimir Makarov <vmakarov@redhat.com>
PR target/84014
* ira-build.c (setup_min_max_allocno_live_range_point): Set up
min/max for never referenced object.
2018-01-24 Vladimir Makarov <vmakarov@redhat.com>
PR target/84014
* gcc.target/powerpc/pr84014.c: New.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@257029 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r-- | gcc/ChangeLog | 6 | ||||
-rw-r--r-- | gcc/ira-build.c | 8 | ||||
-rw-r--r-- | gcc/testsuite/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/testsuite/gcc.target/powerpc/pr84014.c | 20 |
4 files changed, 38 insertions, 1 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index e52ca7c3d6c..c7b0d8e729a 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2018-01-24 Vladimir Makarov <vmakarov@redhat.com> + + PR target/84014 + * ira-build.c (setup_min_max_allocno_live_range_point): Set up + min/max for never referenced object. + 2018-01-24 Jakub Jelinek <jakub@redhat.com> PR middle-end/83977 diff --git a/gcc/ira-build.c b/gcc/ira-build.c index 9ece3ae1d94..c0fd9384f8b 100644 --- a/gcc/ira-build.c +++ b/gcc/ira-build.c @@ -2728,7 +2728,13 @@ setup_min_max_allocno_live_range_point (void) ira_object_t parent_obj; if (OBJECT_MAX (obj) < 0) - continue; + { + /* The object is not used and hence does not live. */ + ira_assert (OBJECT_LIVE_RANGES (obj) == NULL); + OBJECT_MAX (obj) = 0; + OBJECT_MIN (obj) = 1; + continue; + } ira_assert (ALLOCNO_CAP_MEMBER (a) == NULL); /* Accumulation of range info. */ if (ALLOCNO_CAP (a) != NULL) diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index e0ee6b0a438..8f6d434b3f9 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2018-01-24 Vladimir Makarov <vmakarov@redhat.com> + + PR target/84014 + * gcc.target/powerpc/pr84014.c: New. + 2018-01-24 Jakub Jelinek <jakub@redhat.com> PR middle-end/83977 diff --git a/gcc/testsuite/gcc.target/powerpc/pr84014.c b/gcc/testsuite/gcc.target/powerpc/pr84014.c new file mode 100644 index 00000000000..aab0e973ba1 --- /dev/null +++ b/gcc/testsuite/gcc.target/powerpc/pr84014.c @@ -0,0 +1,20 @@ +/* { dg-do compile { target powerpc*-*-* } }*/ +/* { dg-options "-O1 -fno-split-wide-types -m32 -mcpu=e300c3" } */ + +int +nh (void) +{ +} + +long long int +si (void) +{ +} + +int +xf (int fg) +{ + int y5 = nh (); + fg += !!y5 ? y5 : si (); + return fg; +} |