public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug target/103772] New: wrong code with -mavx512fp16
@ 2021-12-20 11:39 zsojka at seznam dot cz
  2021-12-20 14:07 ` [Bug target/103772] [12 Regression] wrong code with -mavx512fp16 since r12-5700-g7eb961d83b0eda53 marxin at gcc dot gnu.org
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: zsojka at seznam dot cz @ 2021-12-20 11:39 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 103772
           Summary: wrong code with -mavx512fp16
           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: x86_64-pc-linux-gnu

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

Output:
$ x86_64-pc-linux-gnu-gcc -Og -mavx512fp16 testcase.c
$ ./a.out 
Aborted

$ 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-r12-6072-20211220084313-g8d1e342b4af-checking-yes-rtl-df-extra-amd64/bin/../libexec/gcc/x86_64-pc-linux-gnu/12.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
--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-r12-6072-20211220084313-g8d1e342b4af-checking-yes-rtl-df-extra-amd64
Thread model: posix
Supported LTO compression algorithms: zlib zstd
gcc version 12.0.0 20211220 (experimental) (GCC)

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

* [Bug target/103772] [12 Regression] wrong code with -mavx512fp16 since r12-5700-g7eb961d83b0eda53
  2021-12-20 11:39 [Bug target/103772] New: wrong code with -mavx512fp16 zsojka at seznam dot cz
@ 2021-12-20 14:07 ` marxin at gcc dot gnu.org
  2021-12-20 16:12 ` pinskia at gcc dot gnu.org
                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: marxin at gcc dot gnu.org @ 2021-12-20 14:07 UTC (permalink / raw)
  To: gcc-bugs

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

Martin Liška <marxin at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |marxin at gcc dot gnu.org,
                   |                            |uros at gcc dot gnu.org
             Status|UNCONFIRMED                 |NEW
            Summary|wrong code with             |[12 Regression] wrong code
                   |-mavx512fp16                |with -mavx512fp16 since
                   |                            |r12-5700-g7eb961d83b0eda53
     Ever confirmed|0                           |1
   Last reconfirmed|                            |2021-12-20

--- Comment #1 from Martin Liška <marxin at gcc dot gnu.org> ---
Started with r12-5700-g7eb961d83b0eda53.

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

* [Bug target/103772] [12 Regression] wrong code with -mavx512fp16 since r12-5700-g7eb961d83b0eda53
  2021-12-20 11:39 [Bug target/103772] New: wrong code with -mavx512fp16 zsojka at seznam dot cz
  2021-12-20 14:07 ` [Bug target/103772] [12 Regression] wrong code with -mavx512fp16 since r12-5700-g7eb961d83b0eda53 marxin at gcc dot gnu.org
@ 2021-12-20 16:12 ` pinskia at gcc dot gnu.org
  2021-12-20 20:04 ` ubizjak at gmail dot com
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: pinskia at gcc dot gnu.org @ 2021-12-20 16:12 UTC (permalink / raw)
  To: gcc-bugs

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

Andrew Pinski <pinskia at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|---                         |12.0

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

* [Bug target/103772] [12 Regression] wrong code with -mavx512fp16 since r12-5700-g7eb961d83b0eda53
  2021-12-20 11:39 [Bug target/103772] New: wrong code with -mavx512fp16 zsojka at seznam dot cz
  2021-12-20 14:07 ` [Bug target/103772] [12 Regression] wrong code with -mavx512fp16 since r12-5700-g7eb961d83b0eda53 marxin at gcc dot gnu.org
  2021-12-20 16:12 ` pinskia at gcc dot gnu.org
@ 2021-12-20 20:04 ` ubizjak at gmail dot com
  2021-12-20 20:16 ` cvs-commit at gcc dot gnu.org
  2021-12-20 20:20 ` ubizjak at gmail dot com
  4 siblings, 0 replies; 6+ messages in thread
From: ubizjak at gmail dot com @ 2021-12-20 20:04 UTC (permalink / raw)
  To: gcc-bugs

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

Uroš Bizjak <ubizjak at gmail dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Assignee|unassigned at gcc dot gnu.org      |ubizjak at gmail dot com
             Status|NEW                         |ASSIGNED

--- Comment #2 from Uroš Bizjak <ubizjak at gmail dot com> ---
Created attachment 52037
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=52037&action=edit
Patch in testing.

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

* [Bug target/103772] [12 Regression] wrong code with -mavx512fp16 since r12-5700-g7eb961d83b0eda53
  2021-12-20 11:39 [Bug target/103772] New: wrong code with -mavx512fp16 zsojka at seznam dot cz
                   ` (2 preceding siblings ...)
  2021-12-20 20:04 ` ubizjak at gmail dot com
@ 2021-12-20 20:16 ` cvs-commit at gcc dot gnu.org
  2021-12-20 20:20 ` ubizjak at gmail dot com
  4 siblings, 0 replies; 6+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2021-12-20 20:16 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #3 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:72c68d7ad90221075102f08f22256d0b4a7631b3

commit r12-6081-g72c68d7ad90221075102f08f22256d0b4a7631b3
Author: Uros Bizjak <ubizjak@gmail.com>
Date:   Mon Dec 20 21:15:50 2021 +0100

    i386: Fix <sse2p4_1>_pinsr<ssemodesuffix> and its splitters [PR103772]

    The clever trick to duplicate the value of the input operand into itself
    proved not so clever after all.  The splitter should not clobber the input
    operand in any case, since the register can hold the value outside the
HImode
    lowpart when accessed as subreg.  Use the standard earlyclobber approach
    instead.

    The testcase fails with avx2 ISA, but I was not able to create the testcase
    that wouldn't require -mavx512fp16 compile flag.

    2021-12-20  Uroš Bizjak  <ubizjak@gmail.com>

    gcc/ChangeLog:

            PR target/103772
            * config/i386/sse.md (<sse2p4_1>_pinsr<ssemodesuffix>): Add
            earlyclobber to (x,x,x,i) alternative.
            (<sse2p4_1>_pinsr<ssemodesuffix> peephole2): Remove.
            (<sse2p4_1>_pinsr<ssemodesuffix> splitter): Use output
            operand as a temporary register.  Split after reload_completed.

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

* [Bug target/103772] [12 Regression] wrong code with -mavx512fp16 since r12-5700-g7eb961d83b0eda53
  2021-12-20 11:39 [Bug target/103772] New: wrong code with -mavx512fp16 zsojka at seznam dot cz
                   ` (3 preceding siblings ...)
  2021-12-20 20:16 ` cvs-commit at gcc dot gnu.org
@ 2021-12-20 20:20 ` ubizjak at gmail dot com
  4 siblings, 0 replies; 6+ messages in thread
From: ubizjak at gmail dot com @ 2021-12-20 20:20 UTC (permalink / raw)
  To: gcc-bugs

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

Uroš Bizjak <ubizjak at gmail dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|ASSIGNED                    |RESOLVED
         Resolution|---                         |FIXED

--- Comment #4 from Uroš Bizjak <ubizjak at gmail dot com> ---
Fixed.

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

end of thread, other threads:[~2021-12-20 20:20 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-12-20 11:39 [Bug target/103772] New: wrong code with -mavx512fp16 zsojka at seznam dot cz
2021-12-20 14:07 ` [Bug target/103772] [12 Regression] wrong code with -mavx512fp16 since r12-5700-g7eb961d83b0eda53 marxin at gcc dot gnu.org
2021-12-20 16:12 ` pinskia at gcc dot gnu.org
2021-12-20 20:04 ` ubizjak at gmail dot com
2021-12-20 20:16 ` cvs-commit at gcc dot gnu.org
2021-12-20 20:20 ` ubizjak 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).