This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] Fix memory alignment on AVX512VL masked floating point stores (PR target/69198)
- From: "H.J. Lu" <hjl dot tools at gmail dot com>
- To: Uros Bizjak <ubizjak at gmail dot com>
- Cc: Jakub Jelinek <jakub at redhat dot com>, Kirill Yukhin <kirill dot yukhin at gmail dot com>, "Enkovich, Ilya" <ilya dot enkovich at intel dot com>, GCC Patches <gcc-patches at gcc dot gnu dot org>
- Date: Tue, 12 Jan 2016 11:58:28 -0800
- Subject: Re: [PATCH] Fix memory alignment on AVX512VL masked floating point stores (PR target/69198)
- Authentication-results: sourceware.org; auth=none
- References: <20160108202056 dot GG18720 at tucnak dot redhat dot com> <20160112131246 dot GB61396 at msticlxl57 dot ims dot intel dot com> <CAMe9rOqrKU=xVzJ8qTJuRDouZp6Q-p8Pq7QSqCFv7PFqSpiUOQ at mail dot gmail dot com> <20160112134228 dot GK3017 at tucnak dot redhat dot com> <CAFULd4aVCMDkwx2JMAYYVtS1VvtMrxD6-bi6ahzRnmKAgrq3iQ at mail dot gmail dot com>
On Tue, Jan 12, 2016 at 5:45 AM, Uros Bizjak <ubizjak@gmail.com> wrote:
> On Tue, Jan 12, 2016 at 2:42 PM, Jakub Jelinek <jakub@redhat.com> wrote:
>> On Tue, Jan 12, 2016 at 05:39:29AM -0800, H.J. Lu wrote:
>>> GCC 5 has the same issue. This patch should be backported to GCC 5
>>> with
>>>
>>> https://gcc.gnu.org/ml/gcc-patches/2016-01/msg00528.html
>>>
>>> which supersedes:
>>>
>>> https://gcc.gnu.org/viewcvs/gcc?view=revision&revision=231269
>>>
>>> OK to backport Jakub's and my patch for GCC 5?
>>
>> I think I'd prefer just r231269 and my patch for the branch, to make the
>> changes as small as possible, leave the cleanup on the trunk only.
>> But, I'm not x86_64 maintainer, so I'll leave that decision to Uros/Kirill.
>
> I agree with Jakub.
>
> Those two patches are OK for backport.
>
This is what I checked in.
Thanks.
--
H.J.
From e6a6fd4b2fb4bb239fed4de6f9374f9b102e9c0f Mon Sep 17 00:00:00 2001
From: ienkovich <ienkovich@138bc75d-0d04-0410-961f-82ee72b054a4>
Date: Fri, 4 Dec 2015 14:18:58 +0000
Subject: [PATCH] Fix alignment check in AVX-512 masked store
Backport from mainline
2016-01-12 Jakub Jelinek <jakub@redhat.com>
PR target/69198
* config/i386/i386.c (ix86_expand_special_args_builtin): Ensure
aligned_mem is properly set for AVX512-VL floating point masked
stores.
2015-12-04 Ilya Enkovich <enkovich.gnu@gmail.com>
* config/i386/sse.md (<avx512>_store<mode>_mask): Fix
operand checked for alignment.
---
gcc/ChangeLog | 15 +++++++++++++++
gcc/config/i386/i386.c | 8 ++++----
gcc/config/i386/sse.md | 2 +-
3 files changed, 20 insertions(+), 5 deletions(-)
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index d7bc6a2..be24722 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,18 @@
+2016-01-12 H.J. Lu <hongjiu.lu@intel.com>
+
+ Backport from mainline
+ 2016-01-12 Jakub Jelinek <jakub@redhat.com>
+
+ PR target/69198
+ * config/i386/i386.c (ix86_expand_special_args_builtin): Ensure
+ aligned_mem is properly set for AVX512-VL floating point masked
+ stores.
+
+ 2015-12-04 Ilya Enkovich <enkovich.gnu@gmail.com>
+
+ * config/i386/sse.md (<avx512>_store<mode>_mask): Fix
+ operand checked for alignment.
+
2016-01-12 James Greenhalgh <james.greenhalgh@arm.com>
Backport from mainline r222186.
diff --git a/gcc/config/i386/i386.c b/gcc/config/i386/i386.c
index 3547ba6..b0c301b 100644
--- a/gcc/config/i386/i386.c
+++ b/gcc/config/i386/i386.c
@@ -38259,7 +38259,11 @@ ix86_expand_special_args_builtin (const struct builtin_description *d,
memory = 0;
break;
case VOID_FTYPE_PV8DF_V8DF_QI:
+ case VOID_FTYPE_PV4DF_V4DF_QI:
+ case VOID_FTYPE_PV2DF_V2DF_QI:
case VOID_FTYPE_PV16SF_V16SF_HI:
+ case VOID_FTYPE_PV8SF_V8SF_QI:
+ case VOID_FTYPE_PV4SF_V4SF_QI:
case VOID_FTYPE_PV8DI_V8DI_QI:
case VOID_FTYPE_PV4DI_V4DI_QI:
case VOID_FTYPE_PV2DI_V2DI_QI:
@@ -38319,10 +38323,6 @@ ix86_expand_special_args_builtin (const struct builtin_description *d,
case VOID_FTYPE_PV16QI_V16QI_HI:
case VOID_FTYPE_PV32QI_V32QI_SI:
case VOID_FTYPE_PV64QI_V64QI_DI:
- case VOID_FTYPE_PV4DF_V4DF_QI:
- case VOID_FTYPE_PV2DF_V2DF_QI:
- case VOID_FTYPE_PV8SF_V8SF_QI:
- case VOID_FTYPE_PV4SF_V4SF_QI:
nargs = 2;
klass = store;
/* Reserve memory operand for target. */
diff --git a/gcc/config/i386/sse.md b/gcc/config/i386/sse.md
index 9235753..15d7188 100644
--- a/gcc/config/i386/sse.md
+++ b/gcc/config/i386/sse.md
@@ -1022,7 +1022,7 @@
sse_suffix = "<ssescalarsize>";
}
- if (misaligned_operand (operands[1], <MODE>mode))
+ if (misaligned_operand (operands[0], <MODE>mode))
align = "u";
else
align = "a";
--
2.5.0