Avoid 512-bit mode MOV for prefer-avx256 option in Intel AVX512 configuration
authorSergey Shalnov <Sergey.Shalnov@intel.com>
Tue, 24 Oct 2017 10:34:55 +0000 (10:34 +0000)
committerKirill Yukhin <kyukhin@gcc.gnu.org>
Tue, 24 Oct 2017 10:34:55 +0000 (10:34 +0000)
gcc/
* config/i386/i386.md(*movsf_internal, *movdf_internal):
Avoid 512-bit AVX modes for TARGET_PREFER_AVX256.

From-SVN: r254038

gcc/ChangeLog
gcc/config/i386/i386.md

index f42428c57f27d6ff2e99dbb486c920fb29832397..82d69edfb0b8ec63a81d960d3d664772ce86e05a 100644 (file)
@@ -1,3 +1,8 @@
+2017-10-06  Sergey Shalnov  <Sergey.Shalnov@intel.com>
+
+       * config/i386/i386.md(*movsf_internal, *movdf_internal):
+       Avoid 512-bit AVX modes for TARGET_PREFER_AVX256.
+
 2017-10-24  Eric Botcazou  <ebotcazou@adacore.com>
 
        PR middle-end/82569
index 57d258298aa919be0cd557375f3cc509313a875c..d5792eb22a4161380fb8f5f526968fafcbd6d073 100644 (file)
 
               /* movaps is one byte shorter for non-AVX targets.  */
               (eq_attr "alternative" "13,17")
-                (cond [(ior (match_operand 0 "ext_sse_reg_operand")
-                            (match_operand 1 "ext_sse_reg_operand"))
+                (cond [(and (ior (not (match_test "TARGET_PREFER_AVX256"))
+                                 (not (match_test "TARGET_AVX512VL")))
+                            (ior (match_operand 0 "ext_sse_reg_operand")
+                                 (match_operand 1 "ext_sse_reg_operand")))
                          (const_string "V8DF")
                        (ior (not (match_test "TARGET_SSE2"))
                             (match_test "TARGET_SSE_PACKED_SINGLE_INSN_OPTIMAL"))
                  better to maintain the whole registers in single format
                  to avoid problems on using packed logical operations.  */
               (eq_attr "alternative" "6")
-                (cond [(ior  (match_operand 0 "ext_sse_reg_operand")
-                             (match_operand 1 "ext_sse_reg_operand"))
+                (cond [(and (ior (not (match_test "TARGET_PREFER_AVX256"))
+                                 (not (match_test "TARGET_AVX512VL")))
+                            (ior (match_operand 0 "ext_sse_reg_operand")
+                                 (match_operand 1 "ext_sse_reg_operand")))
                          (const_string "V16SF")
                        (ior (match_test "TARGET_SSE_PARTIAL_REG_DEPENDENCY")
                             (match_test "TARGET_SSE_SPLIT_REGS"))