public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug target/111534] New: [14 Regression] wrong code with -mgeneral-regs-only and vector compare
@ 2023-09-22  5:05 zsojka at seznam dot cz
  2023-09-22  5:21 ` [Bug target/111534] " pinskia at gcc dot gnu.org
  0 siblings, 1 reply; 2+ messages in thread
From: zsojka at seznam dot cz @ 2023-09-22  5:05 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 111534
           Summary: [14 Regression] wrong code with -mgeneral-regs-only
                    and vector compare
           Product: gcc
           Version: 14.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 55966
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=55966&action=edit
reduced testcase

This might be the same as PR110817, but here only a target option impacts the
behavior, and no other optimizations are enabled.

$ x86_64-pc-linux-gnu-gcc -mgeneral-regs-only 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-r14-4218-20230922114852-ge446ed29f6c-checking-yes-rtl-df-extra-nobootstrap-amd64/bin/../libexec/gcc/x86_64-pc-linux-gnu/14.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-r14-4218-20230922114852-ge446ed29f6c-checking-yes-rtl-df-extra-nobootstrap-amd64
Thread model: posix
Supported LTO compression algorithms: zlib zstd
gcc version 14.0.0 20230922 (experimental) (GCC)

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

* [Bug target/111534] [14 Regression] wrong code with -mgeneral-regs-only and vector compare
  2023-09-22  5:05 [Bug target/111534] New: [14 Regression] wrong code with -mgeneral-regs-only and vector compare zsojka at seznam dot cz
@ 2023-09-22  5:21 ` pinskia at gcc dot gnu.org
  0 siblings, 0 replies; 2+ messages in thread
From: pinskia at gcc dot gnu.org @ 2023-09-22  5:21 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
         Resolution|---                         |DUPLICATE
             Status|UNCONFIRMED                 |RESOLVED

--- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
  _5 = BIT_FIELD_REF <_1, 8, 0>;
  _6 = _5 != 0;
  _7 = _5 == 0;
  _8 = (signed char) _7;
  _9 = (signed char) _5;
  _10 = _9 + -1;

It is the same.

>here only a target option impacts the behavior
Because -mgeneral-regs-only basically is -mno-sse which also shows the issue. 
Basicaly is the lowering of the vector comparison (combined with the referenced
match pattern in the other bug report) which is causing the issue.

*** This bug has been marked as a duplicate of bug 110817 ***

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

end of thread, other threads:[~2023-09-22  5:21 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-09-22  5:05 [Bug target/111534] New: [14 Regression] wrong code with -mgeneral-regs-only and vector compare zsojka at seznam dot cz
2023-09-22  5:21 ` [Bug target/111534] " 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).