From 1d1e69e934d629a1cf0cfa728cd13bd9a43b7ffe Mon Sep 17 00:00:00 2001 From: Sergey Shalnov Date: Fri, 1 Dec 2017 06:22:06 +0000 Subject: [PATCH] Fix wrong instruction vpcmpeqd generation gcc/ * config/i386/i386.c (standard_sse_constant_opcode): Fix wrong form for vpcmpeqd instruction. From-SVN: r255291 --- gcc/ChangeLog | 5 +++++ gcc/config/i386/i386.c | 8 +++++--- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index bfa6016f5cc..8e7e844c688 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2017-12-01 Sergey Shalnov + + * config/i386/i386.c (standard_sse_constant_opcode): Fix wrong form for + vpcmpeqd instruction. + 2017-12-01 Sergey Shalnov * config/i386/i386.c (standard_sse_constant_opcode): Fix diff --git a/gcc/config/i386/i386.c b/gcc/config/i386/i386.c index 2f4ca7c01e9..145b1c6043b 100644 --- a/gcc/config/i386/i386.c +++ b/gcc/config/i386/i386.c @@ -10449,9 +10449,11 @@ standard_sse_constant_opcode (rtx_insn *insn, rtx x) case MODE_V2DF: case MODE_V4SF: gcc_assert (TARGET_SSE2); - return (TARGET_AVX - ? "vpcmpeqd\t%0, %0, %0" - : "pcmpeqd\t%0, %0"); + return (TARGET_AVX512F + ? "vpternlogd\t{$0xFF, %0, %0, %0|%0, %0, %0, 0xFF}" + : TARGET_AVX + ? "vpcmpeqd\t%0, %0, %0" + : "pcmpeqd\t%0, %0"); default: gcc_unreachable (); -- 2.30.2