public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug target/104915] New: Miss optimization for vec_setv8hi_0
@ 2022-03-14 12:23 crazylht at gmail dot com
2022-03-28 2:30 ` [Bug target/104915] " crazylht at gmail dot com
` (3 more replies)
0 siblings, 4 replies; 5+ messages in thread
From: crazylht at gmail dot com @ 2022-03-14 12:23 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104915
Bug ID: 104915
Summary: Miss optimization for vec_setv8hi_0
Product: gcc
Version: 12.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: target
Assignee: unassigned at gcc dot gnu.org
Reporter: crazylht at gmail dot com
Target Milestone: ---
#include<immintrin.h>
__m128i
foo (short* p)
{
return _mm_set_epi32 (0, 0, 0, (unsigned short) ((*(__m16_u *)p)[0]));
}
__m128i
foo1 (short* p)
{
return _mm_set_epi16 (0, 0, 0, 0, 0, 0, 0, (*(__m16_u *)p)[0]);
}
under avx512fp16, foo could generate vmovw instead of movzx + vmovd, without
avx512fp16 foo1 could generate movzx + movd instead of pxor + pinsrw.
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug target/104915] Miss optimization for vec_setv8hi_0
2022-03-14 12:23 [Bug target/104915] New: Miss optimization for vec_setv8hi_0 crazylht at gmail dot com
@ 2022-03-28 2:30 ` crazylht at gmail dot com
2022-03-29 2:29 ` crazylht at gmail dot com
` (2 subsequent siblings)
3 siblings, 0 replies; 5+ messages in thread
From: crazylht at gmail dot com @ 2022-03-28 2:30 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104915
--- Comment #1 from Hongtao.liu <crazylht at gmail dot com> ---
As described in PR105066, pinsrw mem should be better than movzx + vmovd.
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug target/104915] Miss optimization for vec_setv8hi_0
2022-03-14 12:23 [Bug target/104915] New: Miss optimization for vec_setv8hi_0 crazylht at gmail dot com
2022-03-28 2:30 ` [Bug target/104915] " crazylht at gmail dot com
@ 2022-03-29 2:29 ` crazylht at gmail dot com
2022-05-11 7:35 ` cvs-commit at gcc dot gnu.org
2022-05-11 7:36 ` crazylht at gmail dot com
3 siblings, 0 replies; 5+ messages in thread
From: crazylht at gmail dot com @ 2022-03-29 2:29 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104915
--- Comment #2 from Hongtao.liu <crazylht at gmail dot com> ---
Created attachment 52705
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=52705&action=edit
Patch pending for GCC13
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug target/104915] Miss optimization for vec_setv8hi_0
2022-03-14 12:23 [Bug target/104915] New: Miss optimization for vec_setv8hi_0 crazylht at gmail dot com
2022-03-28 2:30 ` [Bug target/104915] " crazylht at gmail dot com
2022-03-29 2:29 ` crazylht at gmail dot com
@ 2022-05-11 7:35 ` cvs-commit at gcc dot gnu.org
2022-05-11 7:36 ` crazylht at gmail dot com
3 siblings, 0 replies; 5+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2022-05-11 7:35 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104915
--- Comment #3 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by hongtao Liu <liuhongt@gcc.gnu.org>:
https://gcc.gnu.org/g:1e69bc810272f289e367570cf89d8c72af6124e4
commit r13-284-g1e69bc810272f289e367570cf89d8c72af6124e4
Author: liuhongt <hongtao.liu@intel.com>
Date: Tue Mar 29 09:21:21 2022 +0800
Optimize movzwl + vmovd/vmovq to vmovw.
Similarly optimize movl + vmovq to vmovd.
gcc/ChangeLog:
PR target/104915
* config/i386/sse.md (*vec_set<mode>_0_zero_extendhi): New
pre_reload define_insn_and_split.
(*vec_setv2di_0_zero_extendhi_1): Ditto.
(*vec_set<mode>_0_zero_extendsi): Ditto.
(*vec_setv2di_0_zero_extendsi_1): Ditto.
(ssewvecmode): New mode attr.
(ssewvecmodelower): Ditto.
(ssepackmodelower): Ditto.
gcc/testsuite/ChangeLog:
* gcc.target/i386/pr104915-vmovd.c: New test.
* gcc.target/i386/pr104915-vmovw.c: New test.
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug target/104915] Miss optimization for vec_setv8hi_0
2022-03-14 12:23 [Bug target/104915] New: Miss optimization for vec_setv8hi_0 crazylht at gmail dot com
` (2 preceding siblings ...)
2022-05-11 7:35 ` cvs-commit at gcc dot gnu.org
@ 2022-05-11 7:36 ` crazylht at gmail dot com
3 siblings, 0 replies; 5+ messages in thread
From: crazylht at gmail dot com @ 2022-05-11 7:36 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104915
Hongtao.liu <crazylht at gmail dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Resolution|--- |FIXED
Status|UNCONFIRMED |RESOLVED
--- Comment #4 from Hongtao.liu <crazylht at gmail dot com> ---
Fixed in GCC13.
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2022-05-11 7:36 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-03-14 12:23 [Bug target/104915] New: Miss optimization for vec_setv8hi_0 crazylht at gmail dot com
2022-03-28 2:30 ` [Bug target/104915] " crazylht at gmail dot com
2022-03-29 2:29 ` crazylht at gmail dot com
2022-05-11 7:35 ` cvs-commit at gcc dot gnu.org
2022-05-11 7:36 ` crazylht at gmail dot com
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).