public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug target/105613] New: [13 Regression] wrong code with unsigned V1TI comparison
@ 2022-05-16 5:07 zsojka at seznam dot cz
2022-05-16 5:19 ` [Bug target/105613] " pinskia at gcc dot gnu.org
` (9 more replies)
0 siblings, 10 replies; 11+ messages in thread
From: zsojka at seznam dot cz @ 2022-05-16 5:07 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105613
Bug ID: 105613
Summary: [13 Regression] wrong code with unsigned V1TI
comparison
Product: gcc
Version: 13.0
Status: UNCONFIRMED
Keywords: wrong-code
Severity: normal
Priority: P3
Component: target
Assignee: unassigned at gcc dot gnu.org
Reporter: zsojka at seznam dot cz
Target Milestone: ---
Host: x86_64-pc-linux-gnu
Target: x86_64-pc-linux-gnu
Created attachment 52982
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=52982&action=edit
reduced testcase
Output:
$ x86_64-pc-linux-gnu-gcc testcase.c
$ ./a.out
Aborted
(gdb) p r
$1 = {0}
$ x86_64-pc-linux-gnu-gcc -v
Using built-in specs.
COLLECT_GCC=/repo/gcc-trunk/binary-latest-amd64/bin/x86_64-pc-linux-gnu-gcc
COLLECT_LTO_WRAPPER=/repo/gcc-trunk/binary-trunk-r13-468-20220516083034-g69c4b5c519f-checking-yes-rtl-df-extra-nobootstrap-amd64/bin/../libexec/gcc/x86_64-pc-linux-gnu/13.0.0/lto-wrapper
Target: x86_64-pc-linux-gnu
Configured with: /repo/gcc-trunk//configure --enable-languages=c,c++
--enable-valgrind-annotations --disable-nls --enable-checking=yes,rtl,df,extra
--disable-bootstrap --with-cloog --with-ppl --with-isl
--build=x86_64-pc-linux-gnu --host=x86_64-pc-linux-gnu
--target=x86_64-pc-linux-gnu --with-ld=/usr/bin/x86_64-pc-linux-gnu-ld
--with-as=/usr/bin/x86_64-pc-linux-gnu-as --disable-libstdcxx-pch
--prefix=/repo/gcc-trunk//binary-trunk-r13-468-20220516083034-g69c4b5c519f-checking-yes-rtl-df-extra-nobootstrap-amd64
Thread model: posix
Supported LTO compression algorithms: zlib zstd
gcc version 13.0.0 20220516 (experimental) (GCC)
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug target/105613] [13 Regression] wrong code with unsigned V1TI comparison
2022-05-16 5:07 [Bug target/105613] New: [13 Regression] wrong code with unsigned V1TI comparison zsojka at seznam dot cz
@ 2022-05-16 5:19 ` pinskia at gcc dot gnu.org
2022-05-16 5:28 ` pinskia at gcc dot gnu.org
` (8 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: pinskia at gcc dot gnu.org @ 2022-05-16 5:19 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105613
Andrew Pinski <pinskia at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|--- |13.0
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug target/105613] [13 Regression] wrong code with unsigned V1TI comparison
2022-05-16 5:07 [Bug target/105613] New: [13 Regression] wrong code with unsigned V1TI comparison zsojka at seznam dot cz
2022-05-16 5:19 ` [Bug target/105613] " pinskia at gcc dot gnu.org
@ 2022-05-16 5:28 ` pinskia at gcc dot gnu.org
2022-05-16 7:17 ` [Bug target/105613] [13 Regression] wrong code with unsigned V1TI comparison since r13-458-gd75d4293dcc029 marxin at gcc dot gnu.org
` (7 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: pinskia at gcc dot gnu.org @ 2022-05-16 5:28 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105613
Andrew Pinski <pinskia at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Ever confirmed|0 |1
Status|UNCONFIRMED |NEW
Last reconfirmed| |2022-05-16
--- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
Confirmed.
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug target/105613] [13 Regression] wrong code with unsigned V1TI comparison since r13-458-gd75d4293dcc029
2022-05-16 5:07 [Bug target/105613] New: [13 Regression] wrong code with unsigned V1TI comparison zsojka at seznam dot cz
2022-05-16 5:19 ` [Bug target/105613] " pinskia at gcc dot gnu.org
2022-05-16 5:28 ` pinskia at gcc dot gnu.org
@ 2022-05-16 7:17 ` marxin at gcc dot gnu.org
2022-05-16 8:13 ` rguenth at gcc dot gnu.org
` (6 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: marxin at gcc dot gnu.org @ 2022-05-16 7:17 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105613
Martin Liška <marxin at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |marxin at gcc dot gnu.org
Summary|[13 Regression] wrong code |[13 Regression] wrong code
|with unsigned V1TI |with unsigned V1TI
|comparison |comparison since
| |r13-458-gd75d4293dcc029
--- Comment #2 from Martin Liška <marxin at gcc dot gnu.org> ---
Started with r13-458-gd75d4293dcc029.
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug target/105613] [13 Regression] wrong code with unsigned V1TI comparison since r13-458-gd75d4293dcc029
2022-05-16 5:07 [Bug target/105613] New: [13 Regression] wrong code with unsigned V1TI comparison zsojka at seznam dot cz
` (2 preceding siblings ...)
2022-05-16 7:17 ` [Bug target/105613] [13 Regression] wrong code with unsigned V1TI comparison since r13-458-gd75d4293dcc029 marxin at gcc dot gnu.org
@ 2022-05-16 8:13 ` rguenth at gcc dot gnu.org
2022-05-16 8:39 ` jakub at gcc dot gnu.org
` (5 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: rguenth at gcc dot gnu.org @ 2022-05-16 8:13 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105613
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Priority|P3 |P1
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug target/105613] [13 Regression] wrong code with unsigned V1TI comparison since r13-458-gd75d4293dcc029
2022-05-16 5:07 [Bug target/105613] New: [13 Regression] wrong code with unsigned V1TI comparison zsojka at seznam dot cz
` (3 preceding siblings ...)
2022-05-16 8:13 ` rguenth at gcc dot gnu.org
@ 2022-05-16 8:39 ` jakub at gcc dot gnu.org
2022-05-16 8:52 ` jakub at gcc dot gnu.org
` (4 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: jakub at gcc dot gnu.org @ 2022-05-16 8:39 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105613
Jakub Jelinek <jakub at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |ASSIGNED
Assignee|unassigned at gcc dot gnu.org |jakub at gcc dot gnu.org
CC| |jakub at gcc dot gnu.org
--- Comment #3 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
We want to use andv4si3 only for EQ, for NE we want to use iorv4si3 instead,
for both expanders.
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug target/105613] [13 Regression] wrong code with unsigned V1TI comparison since r13-458-gd75d4293dcc029
2022-05-16 5:07 [Bug target/105613] New: [13 Regression] wrong code with unsigned V1TI comparison zsojka at seznam dot cz
` (4 preceding siblings ...)
2022-05-16 8:39 ` jakub at gcc dot gnu.org
@ 2022-05-16 8:52 ` jakub at gcc dot gnu.org
2022-05-16 8:59 ` roger at nextmovesoftware dot com
` (3 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: jakub at gcc dot gnu.org @ 2022-05-16 8:52 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105613
--- Comment #4 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Created attachment 52983
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=52983&action=edit
gcc13-pr105613.patch
Untested fix.
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug target/105613] [13 Regression] wrong code with unsigned V1TI comparison since r13-458-gd75d4293dcc029
2022-05-16 5:07 [Bug target/105613] New: [13 Regression] wrong code with unsigned V1TI comparison zsojka at seznam dot cz
` (5 preceding siblings ...)
2022-05-16 8:52 ` jakub at gcc dot gnu.org
@ 2022-05-16 8:59 ` roger at nextmovesoftware dot com
2022-05-17 10:11 ` cvs-commit at gcc dot gnu.org
` (2 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: roger at nextmovesoftware dot com @ 2022-05-16 8:59 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105613
--- Comment #5 from Roger Sayle <roger at nextmovesoftware dot com> ---
Firstly sorry for the inconvenience. Yep, Jakub's analysis is correct we/I
need iorv4si for NE. My thinko, X==Y is X.h==Y.h && X.l==Y.l, but X!=Y is
X.h!=Y.h || X.l!=Y.l, sorry. Many thanks to Jakub for assigning this to
himself so quickly.
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug target/105613] [13 Regression] wrong code with unsigned V1TI comparison since r13-458-gd75d4293dcc029
2022-05-16 5:07 [Bug target/105613] New: [13 Regression] wrong code with unsigned V1TI comparison zsojka at seznam dot cz
` (6 preceding siblings ...)
2022-05-16 8:59 ` roger at nextmovesoftware dot com
@ 2022-05-17 10:11 ` cvs-commit at gcc dot gnu.org
2022-05-17 10:15 ` jakub at gcc dot gnu.org
2022-05-17 10:50 ` marxin at gcc dot gnu.org
9 siblings, 0 replies; 11+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2022-05-17 10:11 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105613
--- Comment #6 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Jakub Jelinek <jakub@gcc.gnu.org>:
https://gcc.gnu.org/g:254cbf72661b932eb039220fccef9a2546ab8f4e
commit r13-552-g254cbf72661b932eb039220fccef9a2546ab8f4e
Author: Jakub Jelinek <jakub@redhat.com>
Date: Tue May 17 12:10:30 2022 +0200
i386: Fix up V2DI and V1TI inequality comparisons [PR105613]
The recent r13-458 change to introduce vec_cmpeqv1tiv1ti and
add TARGET_SSE2 support to vec_cmpeqv2div2di works nicely for
equality comparisons, but as the testcase shows doesn't work
for inequality comparisons.
For EQ if we perform comparison with twice as many half-sized elemenets,
the result should be ~0 when both halves are ~0 only (both halves need
to be equal for the whole to be equal), otherwise 0, so AND is the
correct operation for it.
But for NE, the result should be ~0 when either of the halves is ~0
(if either half is not equal, the whole is not equal) and so the right
operation for NE is IOR, not AND.
2022-05-17 Jakub Jelinek <jakub@redhat.com>
PR target/105613
* config/i386/sse.md (vec_cmpeqv2div2di, vec_cmpeqv1tiv1ti): Use
andv4si3 only for EQ, for NE use iorv4si3 instead.
* gcc.c-torture/execute/pr105613.c: New test.
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug target/105613] [13 Regression] wrong code with unsigned V1TI comparison since r13-458-gd75d4293dcc029
2022-05-16 5:07 [Bug target/105613] New: [13 Regression] wrong code with unsigned V1TI comparison zsojka at seznam dot cz
` (7 preceding siblings ...)
2022-05-17 10:11 ` cvs-commit at gcc dot gnu.org
@ 2022-05-17 10:15 ` jakub at gcc dot gnu.org
2022-05-17 10:50 ` marxin at gcc dot gnu.org
9 siblings, 0 replies; 11+ messages in thread
From: jakub at gcc dot gnu.org @ 2022-05-17 10:15 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105613
Jakub Jelinek <jakub at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|ASSIGNED |RESOLVED
Resolution|--- |FIXED
--- Comment #7 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Fixed.
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug target/105613] [13 Regression] wrong code with unsigned V1TI comparison since r13-458-gd75d4293dcc029
2022-05-16 5:07 [Bug target/105613] New: [13 Regression] wrong code with unsigned V1TI comparison zsojka at seznam dot cz
` (8 preceding siblings ...)
2022-05-17 10:15 ` jakub at gcc dot gnu.org
@ 2022-05-17 10:50 ` marxin at gcc dot gnu.org
9 siblings, 0 replies; 11+ messages in thread
From: marxin at gcc dot gnu.org @ 2022-05-17 10:50 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105613
Martin Liška <marxin at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |vsevolod.livinskiy at gmail dot co
| |m
--- Comment #8 from Martin Liška <marxin at gcc dot gnu.org> ---
*** Bug 105621 has been marked as a duplicate of this bug. ***
^ permalink raw reply [flat|nested] 11+ messages in thread
end of thread, other threads:[~2022-05-17 10:50 UTC | newest]
Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-05-16 5:07 [Bug target/105613] New: [13 Regression] wrong code with unsigned V1TI comparison zsojka at seznam dot cz
2022-05-16 5:19 ` [Bug target/105613] " pinskia at gcc dot gnu.org
2022-05-16 5:28 ` pinskia at gcc dot gnu.org
2022-05-16 7:17 ` [Bug target/105613] [13 Regression] wrong code with unsigned V1TI comparison since r13-458-gd75d4293dcc029 marxin at gcc dot gnu.org
2022-05-16 8:13 ` rguenth at gcc dot gnu.org
2022-05-16 8:39 ` jakub at gcc dot gnu.org
2022-05-16 8:52 ` jakub at gcc dot gnu.org
2022-05-16 8:59 ` roger at nextmovesoftware dot com
2022-05-17 10:11 ` cvs-commit at gcc dot gnu.org
2022-05-17 10:15 ` jakub at gcc dot gnu.org
2022-05-17 10:50 ` marxin 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).