public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug target/101384] New: wrong code at -Og and above with vector shift/multiply
@ 2021-07-09  7:58 zsojka at seznam dot cz
  2021-07-12 17:00 ` [Bug target/101384] " jakub at gcc dot gnu.org
                   ` (14 more replies)
  0 siblings, 15 replies; 16+ messages in thread
From: zsojka at seznam dot cz @ 2021-07-09  7:58 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101384

            Bug ID: 101384
           Summary: wrong code at -Og and above with vector shift/multiply
           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: powerpc64le-unknown-linux-gnu

Created attachment 51121
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=51121&action=edit
reduced testcase

Output:
$ powerpc64le-unknown-linux-gnu-gcc -Og testcase.c -Wno-psabi -static
$ qemu-ppc64le -- ./a.out 
qemu: uncaught target signal 6 (Aborted) - core dumped
Aborted

The vector is:
80808080808080808080808080808080
instead of
80ffffff80ffffff80ffffff80ffffff

 # testcase.c:13: }
        vspltisw 0,-1    # tmp121
        vslb 0,0,0       # tmp121, tmp121, tmp121

looks strange, but simply replacing vslb->vslw doesn't help, as another operand
with 7s for the shift would be needed

$ powerpc64le-unknown-linux-gnu-gcc -v
Using built-in specs.
COLLECT_GCC=/repo/gcc-trunk/binary-latest-powerpc64le/bin/powerpc64le-unknown-linux-gnu-gcc
COLLECT_LTO_WRAPPER=/repo/gcc-trunk/binary-trunk-r12-2137-20210708114755-g4c619132b3f-checking-yes-rtl-df-extra-powerpc64le/bin/../libexec/gcc/powerpc64le-unknown-linux-gnu/12.0.0/lto-wrapper
Target: powerpc64le-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/powerpc64le-unknown-linux-gnu --build=x86_64-pc-linux-gnu
--host=x86_64-pc-linux-gnu --target=powerpc64le-unknown-linux-gnu
--with-ld=/usr/bin/powerpc64le-unknown-linux-gnu-ld
--with-as=/usr/bin/powerpc64le-unknown-linux-gnu-as --disable-libstdcxx-pch
--prefix=/repo/gcc-trunk//binary-trunk-r12-2137-20210708114755-g4c619132b3f-checking-yes-rtl-df-extra-powerpc64le
Thread model: posix
Supported LTO compression algorithms: zlib zstd
gcc version 12.0.0 20210708 (experimental) (GCC)

^ permalink raw reply	[flat|nested] 16+ messages in thread

end of thread, other threads:[~2022-05-11  6:36 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-07-09  7:58 [Bug target/101384] New: wrong code at -Og and above with vector shift/multiply zsojka at seznam dot cz
2021-07-12 17:00 ` [Bug target/101384] " jakub at gcc dot gnu.org
2021-07-13 12:12 ` jakub at gcc dot gnu.org
2021-07-13 12:12 ` [Bug target/101384] [9/10/11/12 Regression] " jakub at gcc dot gnu.org
2021-07-13 12:20 ` jakub at gcc dot gnu.org
2021-07-13 16:13 ` segher at gcc dot gnu.org
2021-07-13 16:55 ` jakub at gcc dot gnu.org
2021-07-13 22:09 ` segher at gcc dot gnu.org
2021-07-14  7:55 ` jakub at gcc dot gnu.org
2021-07-20 14:43 ` cvs-commit at gcc dot gnu.org
2021-07-20 14:45 ` [Bug target/101384] [9/10/12 " jakub at gcc dot gnu.org
2021-07-20 15:28 ` cvs-commit at gcc dot gnu.org
2021-07-20 15:38 ` [Bug target/101384] [9/10 " jakub at gcc dot gnu.org
2022-05-10  8:20 ` cvs-commit at gcc dot gnu.org
2022-05-11  6:21 ` cvs-commit at gcc dot gnu.org
2022-05-11  6:36 ` jakub 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).