aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite
diff options
context:
space:
mode:
authorRichard Biener <rguenther@suse.de>2015-07-02 07:37:35 +0000
committerRichard Biener <rguenth@gcc.gnu.org>2015-07-02 07:37:35 +0000
commita003896684c5b8269eed6b472c2b35fe238294bc (patch)
treeda79f9f2b5d7561937a823eb7a573eb0f7aec873 /gcc/testsuite
parent53ac92c3e040789d34c7aabf4f2a98709de47c17 (diff)
downloadgcc-a003896684c5b8269eed6b472c2b35fe238294bc.zip
gcc-a003896684c5b8269eed6b472c2b35fe238294bc.tar.gz
gcc-a003896684c5b8269eed6b472c2b35fe238294bc.tar.bz2
tree-ssa-dom.c (build_and_record_new_cond): Add optional parameter to record a condition that is false.
2015-07-02 Richard Biener <rguenther@suse.de> * tree-ssa-dom.c (build_and_record_new_cond): Add optional parameter to record a condition that is false. (record_conditions): When recording an extra NE_EXPR that is true also record a EQ_EXPR that is false. * gcc.dg/tree-ssa/ssa-dom-cse-4.c: New testcase. From-SVN: r225299
Diffstat (limited to 'gcc/testsuite')
-rw-r--r--gcc/testsuite/ChangeLog4
-rw-r--r--gcc/testsuite/gcc.dg/tree-ssa/ssa-dom-cse-4.c20
2 files changed, 24 insertions, 0 deletions
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog
index f6903b0..789f44e 100644
--- a/gcc/testsuite/ChangeLog
+++ b/gcc/testsuite/ChangeLog
@@ -1,3 +1,7 @@
+2015-07-02 Richard Biener <rguenther@suse.de>
+
+ * gcc.dg/tree-ssa/ssa-dom-cse-4.c: New testcase.
+
2015-07-01 H.J. Lu <hongjiu.lu@intel.com>
* gcc.target/i386/mpx/pr66568.c (exit): New prototype.
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/ssa-dom-cse-4.c b/gcc/testsuite/gcc.dg/tree-ssa/ssa-dom-cse-4.c
new file mode 100644
index 0000000..cc9dde9
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/tree-ssa/ssa-dom-cse-4.c
@@ -0,0 +1,20 @@
+/* { dg-do compile } */
+/* { dg-options "-O -fdump-tree-optimized" } */
+
+extern void abort (void);
+
+unsigned int
+foo (unsigned int x, unsigned int y)
+{
+ unsigned int z;
+
+ if (x >= y)
+ return 1;
+
+ if (y == x)
+ abort ();
+
+ return 0;
+}
+
+/* { dg-final { scan-tree-dump-not "abort" "optimized" } } */