From: Richard Biener Date: Thu, 2 Nov 2017 13:13:53 +0000 (+0000) Subject: re PR target/82795 (ICE in predicate_mem_writes, at tree-if-conv.c:2251) X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=1e8fc1ce6e1747ffffa46f7e796640feb782572a;p=gcc.git re PR target/82795 (ICE in predicate_mem_writes, at tree-if-conv.c:2251) 2017-11-02 Richard Biener PR tree-optimization/82795 * tree-if-conv.c (predicate_mem_writes): Remove bogus assert. * gcc.target/i386/pr82795.c: New testcase. From-SVN: r254342 --- 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 + + PR tree-optimization/82795 + * tree-if-conv.c (predicate_mem_writes): Remove bogus assert. + 2017-11-02 Rainer Orth * 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 + + PR tree-optimization/82795 + * gcc.target/i386/pr82795.c: New testcase. + 2017-11-02 Claudiu Zissulescu * 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) {