From: "Shalnov, Sergey" <sergey.shalnov@intel.com>
To: "'gcc-patches@gcc.gnu.org'" <gcc-patches@gcc.gnu.org>
Cc: "'kirill.yukhin@gmail.com'" <kirill.yukhin@gmail.com>,
"Koval, Julia" <julia.koval@intel.com>,
"Senkevich, Andrew" <andrew.senkevich@intel.com>,
"Peryt, Sebastian" <sebastian.peryt@intel.com>,
"Ivchenko, Alexander" <alexander.ivchenko@intel.com>,
'Uros Bizjak' <ubizjak@gmail.com>
Subject: [PATCH, i386] Fix movdi_internal to return MODE_TI with AVX512
Date: Wed, 29 Nov 2017 12:10:00 -0000 [thread overview]
Message-ID: <71475DE127B5E94A8E189586234C088822AE76FB@irsmsx105.ger.corp.intel.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 375 bytes --]
Hi,
I found wrong MODE_XI used in movdi_internal that cause zmm
Generation with "-march=skylake-avx512 -mprefer-vector-width=128"
options set. This patch fixes the mode and register type but keep using
AVX512 instruction set.
2017-11-28 Sergey Shalnov <Sergey.Shalnov@intel.com>
gcc/
* config/i386/i386.md: Fix AVX512 register width
in AVX512 instruction.
[-- Attachment #2: 0009-Fix-AVX512-register-width-in-movdi_internal.patch --]
[-- Type: application/octet-stream, Size: 1358 bytes --]
From d46c73bb4c24839fab2c676e5745195ff5807d2c Mon Sep 17 00:00:00 2001
From: Sergey Shalnov <Sergey.Shalnov@intel.com>
Date: Tue, 28 Nov 2017 17:21:17 +0300
Subject: [PATCH 1/1] Fix AVX512 register width in movdi_internal
---
gcc/config/i386/i386.md | 9 ++++++---
1 file changed, 6 insertions(+), 3 deletions(-)
diff --git a/gcc/config/i386/i386.md b/gcc/config/i386/i386.md
index a14efc8..b4d73db 100644
--- a/gcc/config/i386/i386.md
+++ b/gcc/config/i386/i386.md
@@ -2254,10 +2254,13 @@
&& (GENERAL_REG_P (operands[0]) || GENERAL_REG_P (operands[1])))
return "%vmovd\t{%1, %0|%0, %1}";
return "%vmovq\t{%1, %0|%0, %1}";
+
case MODE_TI:
+ /* Handle AVX512 registers set. */
+ if (EXT_REX_SSE_REG_P (operands[0])
+ || EXT_REX_SSE_REG_P (operands[1]))
+ return "vmovdqa64\t{%1, %0|%0, %1}";
return "%vmovdqa\t{%1, %0|%0, %1}";
- case MODE_XI:
- return "vmovdqa64\t{%g1, %g0|%g0, %g1}";
case MODE_V2SF:
gcc_assert (!TARGET_AVX);
@@ -2349,7 +2352,7 @@
(eq_attr "alternative" "12,13")
(cond [(ior (match_operand 0 "ext_sse_reg_operand")
(match_operand 1 "ext_sse_reg_operand"))
- (const_string "XI")
+ (const_string "TI")
(ior (not (match_test "TARGET_SSE2"))
(match_test "TARGET_SSE_PACKED_SINGLE_INSN_OPTIMAL"))
(const_string "V4SF")
--
1.8.3.1
next reply other threads:[~2017-11-29 11:05 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-11-29 12:10 Shalnov, Sergey [this message]
2017-11-29 12:34 ` Uros Bizjak
2017-11-29 12:38 ` Uros Bizjak
2017-12-01 6:44 ` Kirill Yukhin
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=71475DE127B5E94A8E189586234C088822AE76FB@irsmsx105.ger.corp.intel.com \
--to=sergey.shalnov@intel.com \
--cc=alexander.ivchenko@intel.com \
--cc=andrew.senkevich@intel.com \
--cc=gcc-patches@gcc.gnu.org \
--cc=julia.koval@intel.com \
--cc=kirill.yukhin@gmail.com \
--cc=sebastian.peryt@intel.com \
--cc=ubizjak@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).