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 bfa6016f5cc842e58fb4a01c066e9aa4fa33be4b..8e7e844c688770fb0637ead7791b638ff01cf368 100644 (file)
@@ -1,3 +1,8 @@
+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
index 2f4ca7c01e9bfe4afaa6b294d624176e0aabe050..145b1c6043b3223bd7e9955c91ade76e0e5e91dc 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 ();