public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug target/67480] New: AVX512 bitwise logic operations pattern is incorrect
@ 2015-09-07 13:57 afomin.mailbox at gmail dot com
2015-09-07 13:59 ` [Bug target/67480] " afomin.mailbox at gmail dot com
` (5 more replies)
0 siblings, 6 replies; 7+ messages in thread
From: afomin.mailbox at gmail dot com @ 2015-09-07 13:57 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67480
Bug ID: 67480
Summary: AVX512 bitwise logic operations pattern is incorrect
Product: gcc
Version: 6.0
Status: UNCONFIRMED
Keywords: assemble-failure, wrong-code
Severity: normal
Priority: P3
Component: target
Assignee: unassigned at gcc dot gnu.org
Reporter: afomin.mailbox at gmail dot com
CC: kyukhin at gcc dot gnu.org, ubizjak at gmail dot com
Target Milestone: ---
Target: i?86-*-*, x86_64-*-*
For the loop in the attached testcase compiled with -mavx512bw -O2
-ftree-vectorize, we emit invalid AVX512 bitwise logic instruction. The reason
is wrong define_insn pattern: given a, let's say, bitwise `and` instruction
with Q/H mode and no masking for AVX512{F,BW} target, we may result in emitting
an vp<logic> instruction without <ssemodesufix> as there is no AVX512VL
support.
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug target/67480] AVX512 bitwise logic operations pattern is incorrect
2015-09-07 13:57 [Bug target/67480] New: AVX512 bitwise logic operations pattern is incorrect afomin.mailbox at gmail dot com
@ 2015-09-07 13:59 ` afomin.mailbox at gmail dot com
2015-09-07 15:53 ` afomin.mailbox at gmail dot com
` (4 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: afomin.mailbox at gmail dot com @ 2015-09-07 13:59 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67480
--- Comment #1 from Alexander Fomin <afomin.mailbox at gmail dot com> ---
Created attachment 36301
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=36301&action=edit
Testcase
A reproducer
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug target/67480] AVX512 bitwise logic operations pattern is incorrect
2015-09-07 13:57 [Bug target/67480] New: AVX512 bitwise logic operations pattern is incorrect afomin.mailbox at gmail dot com
2015-09-07 13:59 ` [Bug target/67480] " afomin.mailbox at gmail dot com
@ 2015-09-07 15:53 ` afomin.mailbox at gmail dot com
2015-09-10 10:32 ` afomin.mailbox at gmail dot com
` (3 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: afomin.mailbox at gmail dot com @ 2015-09-07 15:53 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67480
--- Comment #2 from Alexander Fomin <afomin.mailbox at gmail dot com> ---
Created attachment 36304
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=36304&action=edit
Proposed fix
Proposed fix.
Splitting instruction pattern into two patterns, namely:
(a) any logic instructions, S/D modes, masking is supported;
(b) any logic instructions, Q/H modes, masking is not supported;
fixes the problem.
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug target/67480] AVX512 bitwise logic operations pattern is incorrect
2015-09-07 13:57 [Bug target/67480] New: AVX512 bitwise logic operations pattern is incorrect afomin.mailbox at gmail dot com
2015-09-07 13:59 ` [Bug target/67480] " afomin.mailbox at gmail dot com
2015-09-07 15:53 ` afomin.mailbox at gmail dot com
@ 2015-09-10 10:32 ` afomin.mailbox at gmail dot com
2015-09-22 11:15 ` kyukhin at gcc dot gnu.org
` (2 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: afomin.mailbox at gmail dot com @ 2015-09-10 10:32 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67480
--- Comment #3 from Alexander Fomin <afomin.mailbox at gmail dot com> ---
There is another problem with the same pattern.
Suppose an V16SF insn mode and AVX512F target (e.g. KNL).
We'll emit something like vandps %zmm1, %zmm2, %zmm3; however, v<logic>ps
family requires AVX512VL and/or AVX512DQ CPUID.
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug target/67480] AVX512 bitwise logic operations pattern is incorrect
2015-09-07 13:57 [Bug target/67480] New: AVX512 bitwise logic operations pattern is incorrect afomin.mailbox at gmail dot com
` (2 preceding siblings ...)
2015-09-10 10:32 ` afomin.mailbox at gmail dot com
@ 2015-09-22 11:15 ` kyukhin at gcc dot gnu.org
2015-09-22 11:20 ` afomin.mailbox at gmail dot com
2015-10-06 12:30 ` kyukhin at gcc dot gnu.org
5 siblings, 0 replies; 7+ messages in thread
From: kyukhin at gcc dot gnu.org @ 2015-09-22 11:15 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67480
--- Comment #4 from Kirill Yukhin <kyukhin at gcc dot gnu.org> ---
Author: kyukhin
Date: Tue Sep 22 11:14:25 2015
New Revision: 228010
URL: https://gcc.gnu.org/viewcvs?rev=228010&root=gcc&view=rev
Log:
PR target/67480
gcc/
* config/i386/sse.md (define_mode_iterator VI48_AVX_AVX512F): New.
(define_mode_iterator VI12_AVX_AVX512F): New.
(define_insn "<mask_codefor><code><mode>3<mask_name>"): Change
all iterators to VI48_AVX_AVX512F. Extract remaining modes ...
(define_insn "*<code><mode>3"): ... Into new pattern using
VI12_AVX_AVX512F iterators without masking.
gcc/testsuite/
* gcc.target/i386/pr67480.c: New test.
Added:
trunk/gcc/testsuite/gcc.target/i386/pr67480.c
Modified:
trunk/gcc/ChangeLog
trunk/gcc/config/i386/sse.md
trunk/gcc/testsuite/ChangeLog
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug target/67480] AVX512 bitwise logic operations pattern is incorrect
2015-09-07 13:57 [Bug target/67480] New: AVX512 bitwise logic operations pattern is incorrect afomin.mailbox at gmail dot com
` (3 preceding siblings ...)
2015-09-22 11:15 ` kyukhin at gcc dot gnu.org
@ 2015-09-22 11:20 ` afomin.mailbox at gmail dot com
2015-10-06 12:30 ` kyukhin at gcc dot gnu.org
5 siblings, 0 replies; 7+ messages in thread
From: afomin.mailbox at gmail dot com @ 2015-09-22 11:20 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67480
Alexander Fomin <afomin.mailbox at gmail dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |RESOLVED
Resolution|--- |FIXED
--- Comment #5 from Alexander Fomin <afomin.mailbox at gmail dot com> ---
Please note that my previous comment is misleading: forced instruction mode
implies no masking at all.
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug target/67480] AVX512 bitwise logic operations pattern is incorrect
2015-09-07 13:57 [Bug target/67480] New: AVX512 bitwise logic operations pattern is incorrect afomin.mailbox at gmail dot com
` (4 preceding siblings ...)
2015-09-22 11:20 ` afomin.mailbox at gmail dot com
@ 2015-10-06 12:30 ` kyukhin at gcc dot gnu.org
5 siblings, 0 replies; 7+ messages in thread
From: kyukhin at gcc dot gnu.org @ 2015-10-06 12:30 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67480
--- Comment #6 from Kirill Yukhin <kyukhin at gcc dot gnu.org> ---
This bug is reproducible on gcc-5-branch
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2015-10-06 12:30 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-09-07 13:57 [Bug target/67480] New: AVX512 bitwise logic operations pattern is incorrect afomin.mailbox at gmail dot com
2015-09-07 13:59 ` [Bug target/67480] " afomin.mailbox at gmail dot com
2015-09-07 15:53 ` afomin.mailbox at gmail dot com
2015-09-10 10:32 ` afomin.mailbox at gmail dot com
2015-09-22 11:15 ` kyukhin at gcc dot gnu.org
2015-09-22 11:20 ` afomin.mailbox at gmail dot com
2015-10-06 12:30 ` kyukhin at gcc dot gnu.org
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).