public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug target/101845] New: wrong code at -O1 on aarch64 with __builtin_shufflevector()
@ 2021-08-10 11:44 zsojka at seznam dot cz
2021-08-11 11:56 ` [Bug target/101845] " belagod at gcc dot gnu.org
2021-08-11 19:27 ` pinskia at gcc dot gnu.org
0 siblings, 2 replies; 3+ messages in thread
From: zsojka at seznam dot cz @ 2021-08-10 11:44 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101845
Bug ID: 101845
Summary: wrong code at -O1 on aarch64 with
__builtin_shufflevector()
Product: gcc
Version: 12.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: aarch64-unknown-linux-gnu
Created attachment 51284
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=51284&action=edit
reduced testcase
Output:
$ aarch64-unknown-linux-gnu-gcc -O testcase.c -static
$ qemu-aarch64 -- ./a.out
qemu: uncaught target signal 6 (Aborted) - core dumped
Aborted
foo:
mvni v0.2s, 0
ret
just 0xffffffffffffffff is returned
$ aarch64-unknown-linux-gnu-gcc -v
Using built-in specs.
COLLECT_GCC=/repo/gcc-trunk/binary-latest-aarch64/bin/aarch64-unknown-linux-gnu-gcc
COLLECT_LTO_WRAPPER=/repo/gcc-trunk/binary-trunk-r12-2833-20210810162020-gc318f8e42b3-checking-yes-rtl-df-extra-aarch64/bin/../libexec/gcc/aarch64-unknown-linux-gnu/12.0.0/lto-wrapper
Target: aarch64-unknown-linux-gnu
Configured with: /repo/gcc-trunk//configure --enable-languages=c,c++
--enable-valgrind-annotations --disable-nls --enable-checking=yes,rtl,df,extra
--with-cloog --with-ppl --with-isl
--with-sysroot=/usr/aarch64-unknown-linux-gnu --build=x86_64-pc-linux-gnu
--host=x86_64-pc-linux-gnu --target=aarch64-unknown-linux-gnu
--with-ld=/usr/bin/aarch64-unknown-linux-gnu-ld
--with-as=/usr/bin/aarch64-unknown-linux-gnu-as --disable-libstdcxx-pch
--prefix=/repo/gcc-trunk//binary-trunk-r12-2833-20210810162020-gc318f8e42b3-checking-yes-rtl-df-extra-aarch64
Thread model: posix
Supported LTO compression algorithms: zlib zstd
gcc version 12.0.0 20210810 (experimental) (GCC)
^ permalink raw reply [flat|nested] 3+ messages in thread
* [Bug target/101845] wrong code at -O1 on aarch64 with __builtin_shufflevector()
2021-08-10 11:44 [Bug target/101845] New: wrong code at -O1 on aarch64 with __builtin_shufflevector() zsojka at seznam dot cz
@ 2021-08-11 11:56 ` belagod at gcc dot gnu.org
2021-08-11 19:27 ` pinskia at gcc dot gnu.org
1 sibling, 0 replies; 3+ messages in thread
From: belagod at gcc dot gnu.org @ 2021-08-11 11:56 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101845
Tejas Belagod <belagod at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Last reconfirmed| |2021-08-11
Ever confirmed|0 |1
Status|UNCONFIRMED |NEW
CC| |belagod at gcc dot gnu.org
--- Comment #1 from Tejas Belagod <belagod at gcc dot gnu.org> ---
Confirmed.
(insn 11 10 12 2 (set (reg:V8QI 92 [ _1 ])
(mult:V8QI (reg:V8QI 100)
(reg/v:V8QI 97 [ v ]))) "shuf.c":11:35 -1
(nil))
(insn 12 11 13 2 (set (reg:V8QI 102)
(const_vector:V8QI [
(const_int -1 [0xffffffffffffffff]) repeated x8
])) -1
(nil))
// Overwriting 92 [_1] looks suspicious?!
(insn 13 12 14 2 (set (subreg:V4HI (reg:V8QI 92 [ _1 ]) 0)
(subreg:V4HI (reg:V8QI 102) 0)) -1
(nil))
// Seems like merging 92 into itself leads to the wrong code...
(insn 14 13 15 2 (set (subreg:V4HI (reg:V8QI 92 [ _1 ]) 0)
(vec_merge:V4HI (vec_duplicate:V4HI (vec_select:HI (subreg:V4HI
(reg:V8QI 92 [ _1 ]) 0)
(parallel [
(const_int 0 [0])
])))
(subreg:V4HI (reg:V8QI 92 [ _1 ]) 0)
(const_int 1 [0x1]))) -1
(nil))
^ permalink raw reply [flat|nested] 3+ messages in thread
* [Bug target/101845] wrong code at -O1 on aarch64 with __builtin_shufflevector()
2021-08-10 11:44 [Bug target/101845] New: wrong code at -O1 on aarch64 with __builtin_shufflevector() zsojka at seznam dot cz
2021-08-11 11:56 ` [Bug target/101845] " belagod at gcc dot gnu.org
@ 2021-08-11 19:27 ` pinskia at gcc dot gnu.org
1 sibling, 0 replies; 3+ messages in thread
From: pinskia at gcc dot gnu.org @ 2021-08-11 19:27 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101845
Andrew Pinski <pinskia at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution|--- |DUPLICATE
--- Comment #2 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
(In reply to Tejas Belagod from comment #1)
> Confirmed.
>
> (insn 11 10 12 2 (set (reg:V8QI 92 [ _1 ])
> (mult:V8QI (reg:V8QI 100)
> (reg/v:V8QI 97 [ v ]))) "shuf.c":11:35 -1
> (nil))
> (insn 12 11 13 2 (set (reg:V8QI 102)
> (const_vector:V8QI [
> (const_int -1 [0xffffffffffffffff]) repeated x8
> ])) -1
> (nil))
>
> // Overwriting 92 [_1] looks suspicious?!
Yes so it is the same problem as PR 101529.
*** This bug has been marked as a duplicate of bug 101529 ***
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2021-08-11 19:27 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-08-10 11:44 [Bug target/101845] New: wrong code at -O1 on aarch64 with __builtin_shufflevector() zsojka at seznam dot cz
2021-08-11 11:56 ` [Bug target/101845] " belagod at gcc dot gnu.org
2021-08-11 19:27 ` pinskia 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).