diff options
author | Richard Biener <rguenther@suse.de> | 2017-11-02 13:13:53 +0000 |
---|---|---|
committer | Richard Biener <rguenth@gcc.gnu.org> | 2017-11-02 13:13:53 +0000 |
commit | 1e8fc1ce6e1747ffffa46f7e796640feb782572a (patch) | |
tree | 1a8c0c86ac25367109f8ed713503b559acbe1658 | |
parent | dea82cdb40884d39165b2e10941d7cfef72527b8 (diff) | |
download | gcc-1e8fc1ce6e1747ffffa46f7e796640feb782572a.tar.gz |
re PR target/82795 (ICE in predicate_mem_writes, at tree-if-conv.c:2251)
2017-11-02 Richard Biener <rguenther@suse.de>
PR tree-optimization/82795
* tree-if-conv.c (predicate_mem_writes): Remove bogus assert.
* gcc.target/i386/pr82795.c: New testcase.
From-SVN: r254342
-rw-r--r-- | gcc/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/testsuite/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/testsuite/gcc.target/i386/pr82795.c | 23 | ||||
-rw-r--r-- | gcc/tree-if-conv.c | 5 |
4 files changed, 34 insertions, 4 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index af7aadee5d9..cb46f71ce77 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2017-11-02 Richard Biener <rguenther@suse.de> + + PR tree-optimization/82795 + * tree-if-conv.c (predicate_mem_writes): Remove bogus assert. + 2017-11-02 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE> * acinclude.m4 (gcc_AC_INITFINI_ARRAY): Don't require diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index a8bb8caa0e5..bf8845c063c 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2017-11-02 Richard Biener <rguenther@suse.de> + + PR tree-optimization/82795 + * gcc.target/i386/pr82795.c: New testcase. + 2017-11-02 Claudiu Zissulescu <claziss@synopsys.com> * gcc.target/arc/loop-1.c: Add test. diff --git a/gcc/testsuite/gcc.target/i386/pr82795.c b/gcc/testsuite/gcc.target/i386/pr82795.c new file mode 100644 index 00000000000..9e7fec74699 --- /dev/null +++ b/gcc/testsuite/gcc.target/i386/pr82795.c @@ -0,0 +1,23 @@ +/* { dg-do compile } */ +/* { dg-options "-O3 -mavx2" } */ + +void +sj (int qh, int rn, int *by) +{ + for (;;) + if (qh != 0) + { + int dc; + + for (dc = 0; dc < 17; ++dc) + { + int nn; + + nn = (rn != 0) ? qh : dc; + if (nn != 0) + qh = nn; + else + qh = (qh != 0) ? *by : dc; + } + } +} diff --git a/gcc/tree-if-conv.c b/gcc/tree-if-conv.c index a1803ff4391..c74c80305f9 100644 --- a/gcc/tree-if-conv.c +++ b/gcc/tree-if-conv.c @@ -2247,10 +2247,7 @@ predicate_mem_writes (loop_p loop) TREE_OPERAND (cond, 0), TREE_OPERAND (cond, 1)); else - { - gcc_assert (TREE_CODE (cond) == SSA_NAME); - mask = cond; - } + mask = cond; if (swap) { |