Fix wrong instruction vpcmpeqd generation
authorSergey Shalnov <Sergey.Shalnov@intel.com>
Fri, 1 Dec 2017 06:22:06 +0000 (06:22 +0000)
committerKirill Yukhin <kyukhin@gcc.gnu.org>
Fri, 1 Dec 2017 06:22:06 +0000 (06:22 +0000)
gcc/
* config/i386/i386.c (standard_sse_constant_opcode): Fix wrong form for
vpcmpeqd instruction.

From-SVN: r255291

gcc/ChangeLog
gcc/config/i386/i386.c

index bfa6016..8e7e844 100644 (file)
@@ -1,5 +1,10 @@
 2017-12-01  Sergey Shalnov  <Sergey.Shalnov@intel.com>
 
+       * config/i386/i386.c (standard_sse_constant_opcode): Fix wrong form for
+       vpcmpeqd instruction.
+
+2017-12-01  Sergey Shalnov  <Sergey.Shalnov@intel.com>
+
        * config/i386/i386.c (standard_sse_constant_opcode): Fix
        registers type for 128bit mode.
 
index 2f4ca7c..145b1c6 100644 (file)
@@ -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 ();