From bd7a559a0f5893c9881bdcc45bdc6a3586980dea Mon Sep 17 00:00:00 2001 From: Uros Bizjak Date: Mon, 28 Oct 2019 12:29:43 +0100 Subject: [PATCH] re PR target/92225 (ice in gen_smaxv2di3, at config/i386/sse.md:12225) PR target/92225 * config/i386/sse.md (REDUC_SSE_SMINMAX_MODE): Use TARGET_SSE4_2 condition for V2DImode. testsuite/ChangeLog: PR target/92225 * gcc.target/i386/pr92225.c: New test. From-SVN: r277510 --- gcc/ChangeLog | 6 ++++++ gcc/config/i386/sse.md | 2 +- gcc/testsuite/ChangeLog | 5 +++++ gcc/testsuite/gcc.target/i386/pr92225.c | 19 +++++++++++++++++++ 4 files changed, 31 insertions(+), 1 deletion(-) create mode 100644 gcc/testsuite/gcc.target/i386/pr92225.c diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 10302d60aa7..d11c0ac1aad 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2019-10-28 Uroš Bizjak + + PR target/92225 + * config/i386/sse.md (REDUC_SSE_SMINMAX_MODE): Use TARGET_SSE4_2 + condition for V2DImode. + 2019-10-28 Uroš Bizjak * config/i386/sse.md (sse_cvtss2si_2): diff --git a/gcc/config/i386/sse.md b/gcc/config/i386/sse.md index 1eeb85aa62a..06cadc1cf8c 100644 --- a/gcc/config/i386/sse.md +++ b/gcc/config/i386/sse.md @@ -2825,7 +2825,7 @@ ;; Modes handled by reduc_sm{in,ax}* patterns. (define_mode_iterator REDUC_SSE_SMINMAX_MODE [(V4SF "TARGET_SSE") (V2DF "TARGET_SSE") - (V2DI "TARGET_SSE") (V4SI "TARGET_SSE") (V8HI "TARGET_SSE") + (V2DI "TARGET_SSE4_2") (V4SI "TARGET_SSE") (V8HI "TARGET_SSE") (V16QI "TARGET_SSE")]) (define_expand "reduc__scal_" diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 3fe8a78b7d5..c7f3af7539a 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2019-10-28 Uroš Bizjak + + PR target/92225 + * gcc.target/i386/pr92225.c: New test. + 2019-10-28 Michael Matz PR middle-end/90796 diff --git a/gcc/testsuite/gcc.target/i386/pr92225.c b/gcc/testsuite/gcc.target/i386/pr92225.c new file mode 100644 index 00000000000..b1232195b45 --- /dev/null +++ b/gcc/testsuite/gcc.target/i386/pr92225.c @@ -0,0 +1,19 @@ +/* PR target/92225 */ +/* { dg-do compile } */ +/* { dg-options "-O2 -ftree-vectorize -msse2 -mno-sse4" } */ + +void a (long); + +unsigned *b; + +void +c () +{ + long d = 2; + int e = 0; + + for (; e < 1024; e++) + if (b[e] > d) + d = b[e]; + a (d); +} -- 2.30.2