From: Jakub Jelinek Date: Sun, 10 Feb 2019 11:06:58 +0000 (+0100) Subject: re PR tree-optimization/89268 (r268689 caused FAIL: gcc.dg/vect/pr79887.c) X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=79e2c811f8fe8b212aeb63ae837f9c3a8289e693;p=gcc.git re PR tree-optimization/89268 (r268689 caused FAIL: gcc.dg/vect/pr79887.c) PR tree-optimization/89268 * tree-if-conv.c (version_loop_for_if_conversion): Push to preds only if preds is non-NULL. * gcc.dg/vect/pr89268.c: New test. From-SVN: r268743 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 1ddc32a24f5..b324f15ee93 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2019-02-10 Jakub Jelinek + + PR tree-optimization/89268 + * tree-if-conv.c (version_loop_for_if_conversion): Push to preds only + if preds is non-NULL. + 2019-02-09 Jan Hubicka PR lto/89272 diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index caf31171686..f7b9f0b69b7 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2019-02-10 Jakub Jelinek + + PR tree-optimization/89268 + * gcc.dg/vect/pr89268.c: New test. + 2019-02-10 Rainer Orth * gnat.dg/lto19.adb: Remove dg-excess-errors. diff --git a/gcc/testsuite/gcc.dg/vect/pr89268.c b/gcc/testsuite/gcc.dg/vect/pr89268.c new file mode 100644 index 00000000000..35875ff06a1 --- /dev/null +++ b/gcc/testsuite/gcc.dg/vect/pr89268.c @@ -0,0 +1,7 @@ +/* PR tree-optimization/89268 */ +/* { dg-do compile } */ +/* { dg-require-effective-target vect_condition } */ +/* { dg-additional-options "-fno-trapping-math --param vect-epilogues-nomask=1" } */ +/* { dg-additional-options "-mavx512ifma -mtune=intel" { target x86_64-*-* i?86-*-* } } */ + +#include "pr79887.c" diff --git a/gcc/tree-if-conv.c b/gcc/tree-if-conv.c index cfeaec7ae07..fe3cc0214b4 100644 --- a/gcc/tree-if-conv.c +++ b/gcc/tree-if-conv.c @@ -2760,7 +2760,8 @@ version_loop_for_if_conversion (struct loop *loop, vec *preds) new_loop->force_vectorize = false; gsi = gsi_last_bb (cond_bb); gimple_call_set_arg (g, 1, build_int_cst (integer_type_node, new_loop->num)); - preds->safe_push (g); + if (preds) + preds->safe_push (g); gsi_insert_before (&gsi, g, GSI_SAME_STMT); update_ssa (TODO_update_ssa); return new_loop;