public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug target/98218] New: [TARGET_MMX_WITH_SSE] Miss vec_cmpmn/vcondmn expander for 64bit vector
@ 2020-12-10 1:56 crazylht at gmail dot com
2020-12-10 7:34 ` [Bug target/98218] " rguenth at gcc dot gnu.org
` (18 more replies)
0 siblings, 19 replies; 20+ messages in thread
From: crazylht at gmail dot com @ 2020-12-10 1:56 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98218
Bug ID: 98218
Summary: [TARGET_MMX_WITH_SSE] Miss vec_cmpmn/vcondmn expander
for 64bit vector
Product: gcc
Version: 11.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: target
Assignee: unassigned at gcc dot gnu.org
Reporter: crazylht at gmail dot com
Target Milestone: ---
Host: x86_64-pc-linux-gnu
Target: x86_64-*-* i?86-*-*
Refer to https://godbolt.org/z/sYE88f
cat test.c
typedef char v8qi __attribute__ ((vector_size(8)));
v8qi f1(v8qi a, v8qi b) {
return a == b;
}
gcc -O2 -msse4.1 -S
f1(char __vector(8), char __vector(8)):
pextrb edx, xmm0, 0
pextrb eax, xmm1, 0
pextrb ecx, xmm0, 1
cmp dl, al
pextrb eax, xmm1, 1
pextrb esi, xmm0, 2
setne dl
pextrb edi, xmm0, 3
pextrb r8d, xmm0, 4
sub edx, 1
cmp cl, al
pextrb eax, xmm1, 2
setne cl
pextrb r9d, xmm0, 5
movzx edx, dl
sub ecx, 1
cmp sil, al
pextrb eax, xmm1, 3
setne sil
pextrb r10d, xmm0, 6
pextrb r11d, xmm0, 7
movzx ecx, cl
sub esi, 1
cmp dil, al
pextrb eax, xmm1, 4
setne dil
movzx esi, sil
sub edi, 1
cmp r8b, al
pextrb eax, xmm1, 5
setne r8b
movzx edi, dil
sub r8d, 1
cmp r9b, al
pextrb eax, xmm1, 6
setne r9b
movzx r8d, r8b
sub r9d, 1
cmp r10b, al
pextrb eax, xmm1, 7
setne r10b
movzx r9d, r9b
sub r10d, 1
cmp r11b, al
setne al
movzx r10d, r10b
sub eax, 1
movzx eax, al
sal rax, 8
or rax, r10
sal rax, 8
or rax, r9
sal rax, 8
or rax, r8
sal rax, 8
or rax, rdi
sal rax, 8
or rax, rsi
sal rax, 8
or rax, rcx
sal rax, 8
or rax, rdx
movq xmm0, rax
ret
It should be better with
f1(char __vector(8), char __vector(8)): # @f1(char
__vector(8), char __vector(8))
pcmpeqb xmm0, xmm1
ret
^ permalink raw reply [flat|nested] 20+ messages in thread
* [Bug target/98218] [TARGET_MMX_WITH_SSE] Miss vec_cmpmn/vcondmn expander for 64bit vector
2020-12-10 1:56 [Bug target/98218] New: [TARGET_MMX_WITH_SSE] Miss vec_cmpmn/vcondmn expander for 64bit vector crazylht at gmail dot com
@ 2020-12-10 7:34 ` rguenth at gcc dot gnu.org
2020-12-18 13:23 ` ubizjak at gmail dot com
` (17 subsequent siblings)
18 siblings, 0 replies; 20+ messages in thread
From: rguenth at gcc dot gnu.org @ 2020-12-10 7:34 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98218
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Last reconfirmed| |2020-12-10
Keywords| |missed-optimization
Status|UNCONFIRMED |NEW
Ever confirmed|0 |1
--- Comment #1 from Richard Biener <rguenth at gcc dot gnu.org> ---
Confirmed.
^ permalink raw reply [flat|nested] 20+ messages in thread
* [Bug target/98218] [TARGET_MMX_WITH_SSE] Miss vec_cmpmn/vcondmn expander for 64bit vector
2020-12-10 1:56 [Bug target/98218] New: [TARGET_MMX_WITH_SSE] Miss vec_cmpmn/vcondmn expander for 64bit vector crazylht at gmail dot com
2020-12-10 7:34 ` [Bug target/98218] " rguenth at gcc dot gnu.org
@ 2020-12-18 13:23 ` ubizjak at gmail dot com
2020-12-18 13:28 ` ubizjak at gmail dot com
` (16 subsequent siblings)
18 siblings, 0 replies; 20+ messages in thread
From: ubizjak at gmail dot com @ 2020-12-18 13:23 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98218
--- Comment #2 from Uroš Bizjak <ubizjak at gmail dot com> ---
Created attachment 49796
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=49796&action=edit
Proposed patch to implement integer vector compares
Attached patch implements integer vector compares.
^ permalink raw reply [flat|nested] 20+ messages in thread
* [Bug target/98218] [TARGET_MMX_WITH_SSE] Miss vec_cmpmn/vcondmn expander for 64bit vector
2020-12-10 1:56 [Bug target/98218] New: [TARGET_MMX_WITH_SSE] Miss vec_cmpmn/vcondmn expander for 64bit vector crazylht at gmail dot com
2020-12-10 7:34 ` [Bug target/98218] " rguenth at gcc dot gnu.org
2020-12-18 13:23 ` ubizjak at gmail dot com
@ 2020-12-18 13:28 ` ubizjak at gmail dot com
2020-12-18 13:29 ` ubizjak at gmail dot com
` (15 subsequent siblings)
18 siblings, 0 replies; 20+ messages in thread
From: ubizjak at gmail dot com @ 2020-12-18 13:28 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98218
--- Comment #3 from Uroš Bizjak <ubizjak at gmail dot com> ---
Testcase 1:
--cut here--
typedef short vec __attribute__((vector_size(8)));
typedef unsigned short uvec __attribute__((vector_size(8)));
vec lt (vec a, vec b) { return a < b; }
vec le (vec a, vec b) { return a <= b; }
vec eq (vec a, vec b) { return a == b; }
vec ne (vec a, vec b) { return a != b; }
vec ge (vec a, vec b) { return a >= b; }
vec gt (vec a, vec b) { return a > b; }
vec ltu (uvec a, uvec b) { return a < b; }
vec leu (uvec a, uvec b) { return a <= b; }
vec geu (uvec a, uvec b) { return a >= b; }
vec gtu (uvec a, uvec b) { return a > b; }
--cut here--
Testcase 2:
--cut here--
typedef short T;
#define M 4
T a[M];
T b[M];
T s1[M];
T s2[M];
T r[M];
void foo (void)
{
int j;
for (j = 0; j < M; j++)
r[j] = (a[j] < b[j]) ? s1[j] : s2[j];
}
--cut here--
gcc -O3:
foo:
movq a(%rip), %xmm1
movq b(%rip), %xmm0
movq s2(%rip), %xmm2
pcmpgtw %xmm1, %xmm0
movq s1(%rip), %xmm1
pand %xmm0, %xmm1
pandn %xmm2, %xmm0
por %xmm1, %xmm0
movq %xmm0, r(%rip)
ret
^ permalink raw reply [flat|nested] 20+ messages in thread
* [Bug target/98218] [TARGET_MMX_WITH_SSE] Miss vec_cmpmn/vcondmn expander for 64bit vector
2020-12-10 1:56 [Bug target/98218] New: [TARGET_MMX_WITH_SSE] Miss vec_cmpmn/vcondmn expander for 64bit vector crazylht at gmail dot com
` (2 preceding siblings ...)
2020-12-18 13:28 ` ubizjak at gmail dot com
@ 2020-12-18 13:29 ` ubizjak at gmail dot com
2021-05-05 13:11 ` cvs-commit at gcc dot gnu.org
` (14 subsequent siblings)
18 siblings, 0 replies; 20+ messages in thread
From: ubizjak at gmail dot com @ 2020-12-18 13:29 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98218
Uroš Bizjak <ubizjak at gmail dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Severity|normal |enhancement
Target|x86_64-*-* i?86-*-* |x86
Status|NEW |ASSIGNED
Host|x86_64-pc-linux-gnu |
Target Milestone|--- |12.0
Assignee|unassigned at gcc dot gnu.org |ubizjak at gmail dot com
^ permalink raw reply [flat|nested] 20+ messages in thread
* [Bug target/98218] [TARGET_MMX_WITH_SSE] Miss vec_cmpmn/vcondmn expander for 64bit vector
2020-12-10 1:56 [Bug target/98218] New: [TARGET_MMX_WITH_SSE] Miss vec_cmpmn/vcondmn expander for 64bit vector crazylht at gmail dot com
` (3 preceding siblings ...)
2020-12-18 13:29 ` ubizjak at gmail dot com
@ 2021-05-05 13:11 ` cvs-commit at gcc dot gnu.org
2021-05-05 13:28 ` ubizjak at gmail dot com
` (13 subsequent siblings)
18 siblings, 0 replies; 20+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2021-05-05 13:11 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98218
--- Comment #4 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Uros Bizjak <uros@gcc.gnu.org>:
https://gcc.gnu.org/g:f3661f2d63fbc5fd30c24d22137691e16b0a0a17
commit r12-514-gf3661f2d63fbc5fd30c24d22137691e16b0a0a17
Author: Uros Bizjak <ubizjak@gmail.com>
Date: Wed May 5 15:07:25 2021 +0200
i386: Implement integer vector compares for 64bit vectors [PR98218]
Implement integer vector compares for 64bit vectors for
TARGET_MMX_WITH_SSE.
2021-05-05 Uroš Bizjak <ubizjak@gmail.com>
gcc/
PR target/98218
* config/i386/i386-expand.c (ix86_expand_int_sse_cmp):
Handle V8QI, V4HI and V2SI modes.
* config/i386/i386.c (ix86_build_const_vector): Handle V2SImode.
(ix86_build_signbit_mask): Ditto.
* config/i386/mmx.md (MMXMODE14): New mode iterator.
(<smaxmin:code><MMXMODE14:mode>3): New expander.
(*mmx_<smaxmin:code><MMXMODE14:mode>3): New insn pattern.
(<umaxmin:code><MMXMODE24:mode>3): New expander.
(*mmx_<umaxmin:code><MMXMODE24:mode>3): New insn pattern.
(vec_cmp<MMXMODEI:mode><MMXMODEI:mode>): New expander.
(vec_cmpu<MMXMODEI:mode><MMXMODEI:mode>): Ditto.
(vcond<MMXMODEI:mode><MMXMODEI:mode>): Ditto.
(vcondu<MMXMODEI:mode><MMXMODEI:mode>): Ditto.
(vcond_mask_<MMXMODEI:mode><MMXMODEI:mode>): Ditto.
gcc/testsuite/
PR target/98218
* gcc.target/i386/pr98218-1.c: New test.
* gcc.target/i386/pr98218-1a.c: Ditto.
* gcc.target/i386/pr98218-2.c: Ditto.
* gcc.target/i386/pr98218-2a.c: Ditto.
* gcc.target/i386/pr98218-3.c: Ditto.
* gcc.target/i386/pr98218-3a.c: Ditto.
* gcc.dg/vect/vect-bool-cmp.c (dg-final):
Scan vect tree dump for "LOOP VECTORIZED", not VECTORIZED.
^ permalink raw reply [flat|nested] 20+ messages in thread
* [Bug target/98218] [TARGET_MMX_WITH_SSE] Miss vec_cmpmn/vcondmn expander for 64bit vector
2020-12-10 1:56 [Bug target/98218] New: [TARGET_MMX_WITH_SSE] Miss vec_cmpmn/vcondmn expander for 64bit vector crazylht at gmail dot com
` (4 preceding siblings ...)
2021-05-05 13:11 ` cvs-commit at gcc dot gnu.org
@ 2021-05-05 13:28 ` ubizjak at gmail dot com
2021-05-07 15:15 ` cvs-commit at gcc dot gnu.org
` (12 subsequent siblings)
18 siblings, 0 replies; 20+ messages in thread
From: ubizjak at gmail dot com @ 2021-05-05 13:28 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98218
Uroš Bizjak <ubizjak at gmail dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|ASSIGNED |RESOLVED
Resolution|--- |FIXED
--- Comment #5 from Uroš Bizjak <ubizjak at gmail dot com> ---
Implemented for gcc-12.
^ permalink raw reply [flat|nested] 20+ messages in thread
* [Bug target/98218] [TARGET_MMX_WITH_SSE] Miss vec_cmpmn/vcondmn expander for 64bit vector
2020-12-10 1:56 [Bug target/98218] New: [TARGET_MMX_WITH_SSE] Miss vec_cmpmn/vcondmn expander for 64bit vector crazylht at gmail dot com
` (5 preceding siblings ...)
2021-05-05 13:28 ` ubizjak at gmail dot com
@ 2021-05-07 15:15 ` cvs-commit at gcc dot gnu.org
2021-05-12 6:16 ` cvs-commit at gcc dot gnu.org
` (11 subsequent siblings)
18 siblings, 0 replies; 20+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2021-05-07 15:15 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98218
--- Comment #6 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Uros Bizjak <uros@gcc.gnu.org>:
https://gcc.gnu.org/g:5795ec0edc30e077a9900cf3ca0a04ad8ac5ac97
commit r12-615-g5795ec0edc30e077a9900cf3ca0a04ad8ac5ac97
Author: Uros Bizjak <ubizjak@gmail.com>
Date: Fri May 7 17:14:34 2021 +0200
i386: Implement mmx_pblendv to optimize SSE conditional moves [PR98218]
Implement mmx_pblendv to optimize V8HI, V4HI and V2SI mode
conditional moves for SSE4.1 targets.
2021-05-07 Uroš Bizjak <ubizjak@gmail.com>
gcc/
PR target/98218
* config/i386/i386-expand.c (ix86_expand_sse_movcc):
Handle V8QI, V4HI and V2SI modes.
* config/i386/mmx.md (mmx_pblendvb): New insn pattern.
* config/i386/sse.md (unspec): Move UNSPEC_BLENDV ...
* config/i386/i386.md (unspec): ... here.
^ permalink raw reply [flat|nested] 20+ messages in thread
* [Bug target/98218] [TARGET_MMX_WITH_SSE] Miss vec_cmpmn/vcondmn expander for 64bit vector
2020-12-10 1:56 [Bug target/98218] New: [TARGET_MMX_WITH_SSE] Miss vec_cmpmn/vcondmn expander for 64bit vector crazylht at gmail dot com
` (6 preceding siblings ...)
2021-05-07 15:15 ` cvs-commit at gcc dot gnu.org
@ 2021-05-12 6:16 ` cvs-commit at gcc dot gnu.org
2021-05-12 6:24 ` [Bug target/98218] [TARGET_MMX_WITH_SSE] Implement 64bit vector compares (AVX512 masked compares missing) ubizjak at gmail dot com
` (10 subsequent siblings)
18 siblings, 0 replies; 20+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2021-05-12 6:16 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98218
--- Comment #7 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Uros Bizjak <uros@gcc.gnu.org>:
https://gcc.gnu.org/g:b1f7fd8a2a5558da1e101de11bb1cdba081ce010
commit r12-731-gb1f7fd8a2a5558da1e101de11bb1cdba081ce010
Author: Uros Bizjak <ubizjak@gmail.com>
Date: Wed May 12 08:11:18 2021 +0200
i386: Implement FP vector compares for V2SFmode [PR98218]
Implement FP vector compares for V2SFmode for TARGET_MMX_WITH_SSE.
2021-05-12 Uroš Bizjak <ubizjak@gmail.com>
gcc/
PR target/98218
* config/i386/i386-expand.c (ix86_expand_sse_movcc): Handle V2SF
mode.
* config/i386/mmx.md (MMXMODE124): New mode iterator.
(V2FI): Ditto.
(mmxintvecmode): New mode attribute.
(mmxintvecmodelower): Ditto.
(*mmx_maskcmpv2sf3_comm): New insn pattern.
(*mmx_maskcmpv2sf3): Ditto.
(vec_cmpv2sfv2si): New expander.
(vcond<V2FI:mode>v2si): Ditto.
(mmx_vlendvps): New insn pattern.
(vcond<MMXMODE124:mode><MMXMODEI:mode>): Also handle V2SFmode.
(vcondu<MMXMODE124:mode><MMXMODEI:mode>): Ditto.
(vcond_mask_<mode><mmxintvecmodelower>): Ditto.
gcc/testsuite/
PR target/98218
* g++.target/i386/pr98218-1.C: Ditto.
* gcc.target/i386/pr98218-4.c: New test.
* gcc.target/i386/pr98218-1.c: Correct PR number.
* gcc.target/i386/pr98218-1a.c: Ditto.
* gcc.target/i386/pr98218-2.c: Ditto.
* gcc.target/i386/pr98218-2a.c: Ditto.
* gcc.target/i386/pr98218-3.c: Ditto.
* gcc.target/i386/pr98218-3a.c: Ditto.
^ permalink raw reply [flat|nested] 20+ messages in thread
* [Bug target/98218] [TARGET_MMX_WITH_SSE] Implement 64bit vector compares (AVX512 masked compares missing)
2020-12-10 1:56 [Bug target/98218] New: [TARGET_MMX_WITH_SSE] Miss vec_cmpmn/vcondmn expander for 64bit vector crazylht at gmail dot com
` (7 preceding siblings ...)
2021-05-12 6:16 ` cvs-commit at gcc dot gnu.org
@ 2021-05-12 6:24 ` ubizjak at gmail dot com
2021-05-12 6:25 ` ubizjak at gmail dot com
` (9 subsequent siblings)
18 siblings, 0 replies; 20+ messages in thread
From: ubizjak at gmail dot com @ 2021-05-12 6:24 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98218
Uroš Bizjak <ubizjak at gmail dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Summary|[TARGET_MMX_WITH_SSE] Miss |[TARGET_MMX_WITH_SSE]
|vec_cmpmn/vcondmn expander |Implement 64bit vector
|for 64bit vector |compares (AVX512 masked
| |compares missing)
Status|RESOLVED |NEW
Resolution|FIXED |---
--- Comment #8 from Uroš Bizjak <ubizjak at gmail dot com> ---
AVX512 masked compares are currently not implemented and fall back to
vpblendvb/vpblendps.
^ permalink raw reply [flat|nested] 20+ messages in thread
* [Bug target/98218] [TARGET_MMX_WITH_SSE] Implement 64bit vector compares (AVX512 masked compares missing)
2020-12-10 1:56 [Bug target/98218] New: [TARGET_MMX_WITH_SSE] Miss vec_cmpmn/vcondmn expander for 64bit vector crazylht at gmail dot com
` (8 preceding siblings ...)
2021-05-12 6:24 ` [Bug target/98218] [TARGET_MMX_WITH_SSE] Implement 64bit vector compares (AVX512 masked compares missing) ubizjak at gmail dot com
@ 2021-05-12 6:25 ` ubizjak at gmail dot com
2021-05-12 6:54 ` crazylht at gmail dot com
` (8 subsequent siblings)
18 siblings, 0 replies; 20+ messages in thread
From: ubizjak at gmail dot com @ 2021-05-12 6:25 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98218
Uroš Bizjak <ubizjak at gmail dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Assignee|ubizjak at gmail dot com |unassigned at gcc dot gnu.org
--- Comment #9 from Uroš Bizjak <ubizjak at gmail dot com> ---
Un-assigning for AVX512.
^ permalink raw reply [flat|nested] 20+ messages in thread
* [Bug target/98218] [TARGET_MMX_WITH_SSE] Implement 64bit vector compares (AVX512 masked compares missing)
2020-12-10 1:56 [Bug target/98218] New: [TARGET_MMX_WITH_SSE] Miss vec_cmpmn/vcondmn expander for 64bit vector crazylht at gmail dot com
` (9 preceding siblings ...)
2021-05-12 6:25 ` ubizjak at gmail dot com
@ 2021-05-12 6:54 ` crazylht at gmail dot com
2021-05-12 17:39 ` dcb314 at hotmail dot com
` (7 subsequent siblings)
18 siblings, 0 replies; 20+ messages in thread
From: crazylht at gmail dot com @ 2021-05-12 6:54 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98218
--- Comment #10 from Hongtao.liu <crazylht at gmail dot com> ---
(In reply to Uroš Bizjak from comment #9)
> Un-assigning for AVX512.
I'll take a look.
^ permalink raw reply [flat|nested] 20+ messages in thread
* [Bug target/98218] [TARGET_MMX_WITH_SSE] Implement 64bit vector compares (AVX512 masked compares missing)
2020-12-10 1:56 [Bug target/98218] New: [TARGET_MMX_WITH_SSE] Miss vec_cmpmn/vcondmn expander for 64bit vector crazylht at gmail dot com
` (10 preceding siblings ...)
2021-05-12 6:54 ` crazylht at gmail dot com
@ 2021-05-12 17:39 ` dcb314 at hotmail dot com
2021-05-12 18:38 ` ubizjak at gmail dot com
` (6 subsequent siblings)
18 siblings, 0 replies; 20+ messages in thread
From: dcb314 at hotmail dot com @ 2021-05-12 17:39 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98218
David Binderman <dcb314 at hotmail dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |dcb314 at hotmail dot com
--- Comment #11 from David Binderman <dcb314 at hotmail dot com> ---
I might be seeing something similar:
caxcpy.f: In function 'caxcpy':
caxcpy.f:53:72: error: unrecognizable insn:
53 | end subroutine
|
^
(insn 136 135 137 16 (set (reg:V2SF 107 [ vect__96.11 ])
(if_then_else:V2SF (reg:V2SF 220)
(reg:V2SF 84 [ _3 ])
(reg:V2SF 219))) -1
(nil))
during RTL pass: vregs
caxcpy.f:53:72: internal compiler error: in extract_insn, at recog.c:2770
^ permalink raw reply [flat|nested] 20+ messages in thread
* [Bug target/98218] [TARGET_MMX_WITH_SSE] Implement 64bit vector compares (AVX512 masked compares missing)
2020-12-10 1:56 [Bug target/98218] New: [TARGET_MMX_WITH_SSE] Miss vec_cmpmn/vcondmn expander for 64bit vector crazylht at gmail dot com
` (11 preceding siblings ...)
2021-05-12 17:39 ` dcb314 at hotmail dot com
@ 2021-05-12 18:38 ` ubizjak at gmail dot com
2021-05-12 18:57 ` ubizjak at gmail dot com
` (5 subsequent siblings)
18 siblings, 0 replies; 20+ messages in thread
From: ubizjak at gmail dot com @ 2021-05-12 18:38 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98218
--- Comment #12 from Uroš Bizjak <ubizjak at gmail dot com> ---
(In reply to David Binderman from comment #11)
> I might be seeing something similar:
>
> caxcpy.f: In function 'caxcpy':
> caxcpy.f:53:72: error: unrecognizable insn:
> 53 | end subroutine
> |
> ^
> (insn 136 135 137 16 (set (reg:V2SF 107 [ vect__96.11 ])
> (if_then_else:V2SF (reg:V2SF 220)
> (reg:V2SF 84 [ _3 ])
> (reg:V2SF 219))) -1
> (nil))
> during RTL pass: vregs
> caxcpy.f:53:72: internal compiler error: in extract_insn, at recog.c:2770
Yeah, this is a non-existent SSE "cmove". I tried to find all paths where this
should divert to a sequence of logic instructions or PBLENDB, but due to
plethora of ISAs some cmove expansions fell through the cracks. Fortunately,
easy to fix problem, please just provide a testcase.
^ permalink raw reply [flat|nested] 20+ messages in thread
* [Bug target/98218] [TARGET_MMX_WITH_SSE] Implement 64bit vector compares (AVX512 masked compares missing)
2020-12-10 1:56 [Bug target/98218] New: [TARGET_MMX_WITH_SSE] Miss vec_cmpmn/vcondmn expander for 64bit vector crazylht at gmail dot com
` (12 preceding siblings ...)
2021-05-12 18:38 ` ubizjak at gmail dot com
@ 2021-05-12 18:57 ` ubizjak at gmail dot com
2021-05-12 19:05 ` dcb314 at hotmail dot com
` (4 subsequent siblings)
18 siblings, 0 replies; 20+ messages in thread
From: ubizjak at gmail dot com @ 2021-05-12 18:57 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98218
--- Comment #13 from Uroš Bizjak <ubizjak at gmail dot com> ---
(In reply to Uroš Bizjak from comment #12)
> Yeah, this is a non-existent SSE "cmove". I tried to find all paths where
> this should divert to a sequence of logic instructions or PBLENDB, but due
> to plethora of ISAs some cmove expansions fell through the cracks.
> Fortunately, easy to fix problem, please just provide a testcase.
A wild guess: you are compiling for TARGET_XOP?
diff --git a/gcc/config/i386/mmx.md b/gcc/config/i386/mmx.md
index d433c524652..7fc2e5d781c 100644
--- a/gcc/config/i386/mmx.md
+++ b/gcc/config/i386/mmx.md
@@ -1816,11 +1816,11 @@
;; XOP parallel XMM conditional moves
(define_insn "*xop_pcmov_<mode>"
- [(set (match_operand:MMXMODEI 0 "register_operand" "=x")
- (if_then_else:MMXMODEI
- (match_operand:MMXMODEI 3 "register_operand" "x")
- (match_operand:MMXMODEI 1 "register_operand" "x")
- (match_operand:MMXMODEI 2 "register_operand" "x")))]
+ [(set (match_operand:MMXMODE124 0 "register_operand" "=x")
+ (if_then_else:MMXMODE124
+ (match_operand:MMXMODE124 3 "register_operand" "x")
+ (match_operand:MMXMODE124 1 "register_operand" "x")
+ (match_operand:MMXMODE124 2 "register_operand" "x")))]
"TARGET_XOP && TARGET_MMX_WITH_SSE"
"vpcmov\t{%3, %2, %1, %0|%0, %1, %2, %3}"
[(set_attr "type" "sse4arg")])
^ permalink raw reply [flat|nested] 20+ messages in thread
* [Bug target/98218] [TARGET_MMX_WITH_SSE] Implement 64bit vector compares (AVX512 masked compares missing)
2020-12-10 1:56 [Bug target/98218] New: [TARGET_MMX_WITH_SSE] Miss vec_cmpmn/vcondmn expander for 64bit vector crazylht at gmail dot com
` (13 preceding siblings ...)
2021-05-12 18:57 ` ubizjak at gmail dot com
@ 2021-05-12 19:05 ` dcb314 at hotmail dot com
2021-05-12 19:47 ` dcb314 at hotmail dot com
` (3 subsequent siblings)
18 siblings, 0 replies; 20+ messages in thread
From: dcb314 at hotmail dot com @ 2021-05-12 19:05 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98218
--- Comment #14 from David Binderman <dcb314 at hotmail dot com> ---
(In reply to Uroš Bizjak from comment #13)
> A wild guess: you are compiling for TARGET_XOP?
Not sure. bdver2.
Reduced C code:
typedef float DBL;
struct {
DBL c_x, c_y
} Random_Simis_Cur;
Random_Simis_i;
DBL Gauss_Rand() {
int __trans_tmp_1;
DBL S, y = exp(S) / 0;
if (__trans_tmp_1)
return y;
return -y;
}
draw_ifs() {
while (Random_Simis_i--) {
Random_Simis_Cur.c_x = Gauss_Rand();
Random_Simis_Cur.c_y = Gauss_Rand();
}
}
Command line is
$ /home/dcb/gcc/results/bin/gcc -c -w -O3 -march=bdver2 -ffast-math bug717.c
^ permalink raw reply [flat|nested] 20+ messages in thread
* [Bug target/98218] [TARGET_MMX_WITH_SSE] Implement 64bit vector compares (AVX512 masked compares missing)
2020-12-10 1:56 [Bug target/98218] New: [TARGET_MMX_WITH_SSE] Miss vec_cmpmn/vcondmn expander for 64bit vector crazylht at gmail dot com
` (14 preceding siblings ...)
2021-05-12 19:05 ` dcb314 at hotmail dot com
@ 2021-05-12 19:47 ` dcb314 at hotmail dot com
2021-05-13 9:23 ` ubizjak at gmail dot com
` (2 subsequent siblings)
18 siblings, 0 replies; 20+ messages in thread
From: dcb314 at hotmail dot com @ 2021-05-12 19:47 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98218
--- Comment #15 from David Binderman <dcb314 at hotmail dot com> ---
Bug first appears sometime between git hash 21dfb22920ce32fc,
dated yesterday and git hash 097fde5e7514e909, dated today.
^ permalink raw reply [flat|nested] 20+ messages in thread
* [Bug target/98218] [TARGET_MMX_WITH_SSE] Implement 64bit vector compares (AVX512 masked compares missing)
2020-12-10 1:56 [Bug target/98218] New: [TARGET_MMX_WITH_SSE] Miss vec_cmpmn/vcondmn expander for 64bit vector crazylht at gmail dot com
` (15 preceding siblings ...)
2021-05-12 19:47 ` dcb314 at hotmail dot com
@ 2021-05-13 9:23 ` ubizjak at gmail dot com
2022-05-06 8:30 ` jakub at gcc dot gnu.org
2023-05-08 12:21 ` rguenth at gcc dot gnu.org
18 siblings, 0 replies; 20+ messages in thread
From: ubizjak at gmail dot com @ 2021-05-13 9:23 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98218
--- Comment #16 from Uroš Bizjak <ubizjak at gmail dot com> ---
(In reply to David Binderman from comment #15)
> Bug first appears sometime between git hash 21dfb22920ce32fc,
> dated yesterday and git hash 097fde5e7514e909, dated today.
Fixed by PR100581.
^ permalink raw reply [flat|nested] 20+ messages in thread
* [Bug target/98218] [TARGET_MMX_WITH_SSE] Implement 64bit vector compares (AVX512 masked compares missing)
2020-12-10 1:56 [Bug target/98218] New: [TARGET_MMX_WITH_SSE] Miss vec_cmpmn/vcondmn expander for 64bit vector crazylht at gmail dot com
` (16 preceding siblings ...)
2021-05-13 9:23 ` ubizjak at gmail dot com
@ 2022-05-06 8:30 ` jakub at gcc dot gnu.org
2023-05-08 12:21 ` rguenth at gcc dot gnu.org
18 siblings, 0 replies; 20+ messages in thread
From: jakub at gcc dot gnu.org @ 2022-05-06 8:30 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98218
Jakub Jelinek <jakub at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|12.0 |12.2
--- Comment #17 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
GCC 12.1 is being released, retargeting bugs to GCC 12.2.
^ permalink raw reply [flat|nested] 20+ messages in thread
* [Bug target/98218] [TARGET_MMX_WITH_SSE] Implement 64bit vector compares (AVX512 masked compares missing)
2020-12-10 1:56 [Bug target/98218] New: [TARGET_MMX_WITH_SSE] Miss vec_cmpmn/vcondmn expander for 64bit vector crazylht at gmail dot com
` (17 preceding siblings ...)
2022-05-06 8:30 ` jakub at gcc dot gnu.org
@ 2023-05-08 12:21 ` rguenth at gcc dot gnu.org
18 siblings, 0 replies; 20+ messages in thread
From: rguenth at gcc dot gnu.org @ 2023-05-08 12:21 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98218
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|12.3 |12.4
--- Comment #19 from Richard Biener <rguenth at gcc dot gnu.org> ---
GCC 12.3 is being released, retargeting bugs to GCC 12.4.
^ permalink raw reply [flat|nested] 20+ messages in thread
end of thread, other threads:[~2023-05-08 12:21 UTC | newest]
Thread overview: 20+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-12-10 1:56 [Bug target/98218] New: [TARGET_MMX_WITH_SSE] Miss vec_cmpmn/vcondmn expander for 64bit vector crazylht at gmail dot com
2020-12-10 7:34 ` [Bug target/98218] " rguenth at gcc dot gnu.org
2020-12-18 13:23 ` ubizjak at gmail dot com
2020-12-18 13:28 ` ubizjak at gmail dot com
2020-12-18 13:29 ` ubizjak at gmail dot com
2021-05-05 13:11 ` cvs-commit at gcc dot gnu.org
2021-05-05 13:28 ` ubizjak at gmail dot com
2021-05-07 15:15 ` cvs-commit at gcc dot gnu.org
2021-05-12 6:16 ` cvs-commit at gcc dot gnu.org
2021-05-12 6:24 ` [Bug target/98218] [TARGET_MMX_WITH_SSE] Implement 64bit vector compares (AVX512 masked compares missing) ubizjak at gmail dot com
2021-05-12 6:25 ` ubizjak at gmail dot com
2021-05-12 6:54 ` crazylht at gmail dot com
2021-05-12 17:39 ` dcb314 at hotmail dot com
2021-05-12 18:38 ` ubizjak at gmail dot com
2021-05-12 18:57 ` ubizjak at gmail dot com
2021-05-12 19:05 ` dcb314 at hotmail dot com
2021-05-12 19:47 ` dcb314 at hotmail dot com
2021-05-13 9:23 ` ubizjak at gmail dot com
2022-05-06 8:30 ` jakub at gcc dot gnu.org
2023-05-08 12:21 ` rguenth 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).