aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLi Jia He <helijia@gcc.gnu.org>2019-05-06 13:17:20 +0000
committerLi Jia He <helijia@gcc.gnu.org>2019-05-06 13:17:20 +0000
commita37aba10107504daad790b0595dd4ef73ad59a6f (patch)
tree46d42c1851b61a696d77f02104ff2541ced4cb27
parent3bc104bdb4b5aa99ff6dceb246beaa65b012c5ac (diff)
downloadgcc-a37aba10107504daad790b0595dd4ef73ad59a6f.zip
gcc-a37aba10107504daad790b0595dd4ef73ad59a6f.tar.gz
gcc-a37aba10107504daad790b0595dd4ef73ad59a6f.tar.bz2
This reverts commit r270894, as new testcase fails on arm and aarch64, I am sorry for this.
From-SVN: r270910
-rw-r--r--gcc/ChangeLog5
-rw-r--r--gcc/testsuite/ChangeLog6
-rw-r--r--gcc/testsuite/gcc.dg/tree-ssa/pr37508.c6
-rw-r--r--gcc/testsuite/gcc.dg/tree-ssa/pr88676-2.c30
-rw-r--r--gcc/tree-ssa-phiopt.c2
5 files changed, 4 insertions, 45 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 3e9b69b..7661237 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -67,11 +67,6 @@
and macros.
* config/i386/t-i386: Define dependencies for new files.
-2019-05-06 Li Jia He <helijia@linux.ibm.com>
-
- * tree-ssa-phiopt.c (two_value_replacement): Fix a typo in parameter
- detection.
-
2019-05-03 Richard Earnshaw <rearnsha@arm.com>
PR target/89400
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog
index 3788739..ec1ec51 100644
--- a/gcc/testsuite/ChangeLog
+++ b/gcc/testsuite/ChangeLog
@@ -21,12 +21,6 @@
systems.
* gcc.dg/tsan/pr88017.c: Likewise.
-2019-05-06 Li Jia He <helijia@linux.ibm.com>
-
- * gcc.dg/tree-ssa/pr37508.c: Add the no-ssa-phiopt option to skip phi
- optimization.
- * gcc.dg/tree-ssa/pr88676-2.c: New testcase.
-
2019-05-05 Thomas Koenig <tkoenig@gcc.gnu.org>
PR fortran/90344
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/pr37508.c b/gcc/testsuite/gcc.dg/tree-ssa/pr37508.c
index a6def04..2ba09af 100644
--- a/gcc/testsuite/gcc.dg/tree-ssa/pr37508.c
+++ b/gcc/testsuite/gcc.dg/tree-ssa/pr37508.c
@@ -1,5 +1,5 @@
/* { dg-do compile } */
-/* { dg-options "-O2 -fno-ssa-phiopt -fno-tree-fre -fdump-tree-vrp1" } */
+/* { dg-options "-O2 -fno-tree-fre -fdump-tree-vrp1" } */
struct foo1 {
int i:1;
@@ -22,7 +22,7 @@ int test2 (struct foo2 *x)
{
if (x->i == 0)
return 1;
- else if (x->i == -1) /* This test is already optimized by ccp1 or phiopt1. */
+ else if (x->i == -1) /* This test is already folded to false by ccp1. */
return 1;
return 0;
}
@@ -31,7 +31,7 @@ int test3 (struct foo1 *x)
{
if (x->i == 0)
return 1;
- else if (x->i == 1) /* This test is already optimized by ccp1 or phiopt1. */
+ else if (x->i == 1) /* This test is already folded to false by fold. */
return 1;
return 0;
}
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/pr88676-2.c b/gcc/testsuite/gcc.dg/tree-ssa/pr88676-2.c
deleted file mode 100644
index a549a1e..0000000
--- a/gcc/testsuite/gcc.dg/tree-ssa/pr88676-2.c
+++ /dev/null
@@ -1,30 +0,0 @@
-/* PR tree-optimization/88676 */
-/* { dg-do compile } */
-/* { dg-options "-O2 -fdump-tree-phiopt1" } */
-/* { dg-final { scan-tree-dump-not " = PHI <" "optimized" } } */
-
-struct foo1 {
- int i:1;
-};
-struct foo2 {
- unsigned i:1;
-};
-
-int test1 (struct foo1 *x)
-{
- if (x->i == 0)
- return 1;
- else if (x->i == 1)
- return 1;
- return 0;
-}
-
-int test2 (struct foo2 *x)
-{
- if (x->i == 0)
- return 1;
- else if (x->i == -1)
- return 1;
- return 0;
-}
-
diff --git a/gcc/tree-ssa-phiopt.c b/gcc/tree-ssa-phiopt.c
index 90674a2..219791e 100644
--- a/gcc/tree-ssa-phiopt.c
+++ b/gcc/tree-ssa-phiopt.c
@@ -602,7 +602,7 @@ two_value_replacement (basic_block cond_bb, basic_block middle_bb,
|| TREE_CODE (arg1) != INTEGER_CST
|| (tree_int_cst_lt (arg0, arg1)
? wi::to_widest (arg0) + 1 != wi::to_widest (arg1)
- : wi::to_widest (arg1) + 1 != wi::to_widest (arg0)))
+ : wi::to_widest (arg1) + 1 != wi::to_widest (arg1)))
return false;
if (!empty_block_p (middle_bb))