public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug target/115631] New: [15 Regression] GCN: [-PASS:-]{+FAIL:+} c-c++-common/torture/builtin-arith-overflow-6.c   -O2  execution test
@ 2024-06-25  7:52 tschwinge at gcc dot gnu.org
  2024-06-25  8:04 ` [Bug target/115631] " ams at gcc dot gnu.org
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: tschwinge at gcc dot gnu.org @ 2024-06-25  7:52 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 115631
           Summary: [15 Regression] GCN: [-PASS:-]{+FAIL:+}
                    c-c++-common/torture/builtin-arith-overflow-6.c   -O2
                    execution test
           Product: gcc
           Version: 15.0
            Status: UNCONFIRMED
          Keywords: testsuite-fail
          Severity: normal
          Priority: P3
         Component: target
          Assignee: unassigned at gcc dot gnu.org
          Reporter: tschwinge at gcc dot gnu.org
                CC: ams at gcc dot gnu.org, rsandifo at gcc dot gnu.org
  Target Milestone: ---
            Target: GCN

With commit r15-1579-g792f97b44ffc5e6a967292b3747fd835e99396e7 "Add a
late-combine pass [PR106594]", I see for GCN target testing (tested
'-march=gfx908') regress for both C, C++:

    @@ -191300,7 +191300,7 @@ PASS:
c-c++-common/torture/builtin-arith-overflow-6.c   -O0  (test for excess er
    PASS: c-c++-common/torture/builtin-arith-overflow-6.c   -O0  execution test
    UNSUPPORTED: c-c++-common/torture/builtin-arith-overflow-6.c   -O1
    PASS: c-c++-common/torture/builtin-arith-overflow-6.c   -O2  (test for
excess errors)
    [-PASS:-]{+FAIL:+} c-c++-common/torture/builtin-arith-overflow-6.c   -O2 
execution test
    UNSUPPORTED: c-c++-common/torture/builtin-arith-overflow-6.c   -O3 -g
    UNSUPPORTED: c-c++-common/torture/builtin-arith-overflow-6.c   -Os

    spawn -ignore SIGHUP [...]/build-gcc/gcc/gcn-run
./builtin-arith-overflow-6.exe
    GCN Kernel Aborted
    Kernel aborted
    FAIL: c-c++-common/torture/builtin-arith-overflow-6.c   -O2  execution test

With '-fno-late-combine-instructions', it's back to PASS.

The diff between good ('-fno-late-combine-instructions') vs. bad
('-flate-combine-instructions') of 'builtin-arith-overflow-6.s' as well as
'-fdump-rtl-all' is big, so I'm not able to directly pinpoint one specific
issue.

I however do observe a number of instances as follows (good vs. bad):

    [...]
            s_mov_b64       exec, -1
    [...]
    -       s_mov_b32       s12, 0
    -       v_writelane_b32 v0, s12, 0
            s_mov_b64       exec, 1
    +       v_mov_b32       v0, 0
            flat_store_dword        v[18:19], v0
    [...]

Might that "move across 'exec'" be in error?

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

* [Bug target/115631] [15 Regression] GCN: [-PASS:-]{+FAIL:+} c-c++-common/torture/builtin-arith-overflow-6.c   -O2  execution test
  2024-06-25  7:52 [Bug target/115631] New: [15 Regression] GCN: [-PASS:-]{+FAIL:+} c-c++-common/torture/builtin-arith-overflow-6.c -O2 execution test tschwinge at gcc dot gnu.org
@ 2024-06-25  8:04 ` ams at gcc dot gnu.org
  2024-06-25  8:23 ` rsandifo at gcc dot gnu.org
                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: ams at gcc dot gnu.org @ 2024-06-25  8:04 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #1 from Andrew Stubbs <ams at gcc dot gnu.org> ---
It was writing 0 to s12 (scalar register) and then moving the zero to lane zero
of v0 (vector register).

Now it's writing the 0 directly to v0, of which all but lane zero is masked.

These should be identical (unless s12 was also live).

The problem must be elsewhere.

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

* [Bug target/115631] [15 Regression] GCN: [-PASS:-]{+FAIL:+} c-c++-common/torture/builtin-arith-overflow-6.c   -O2  execution test
  2024-06-25  7:52 [Bug target/115631] New: [15 Regression] GCN: [-PASS:-]{+FAIL:+} c-c++-common/torture/builtin-arith-overflow-6.c -O2 execution test tschwinge at gcc dot gnu.org
  2024-06-25  8:04 ` [Bug target/115631] " ams at gcc dot gnu.org
@ 2024-06-25  8:23 ` rsandifo at gcc dot gnu.org
  2024-06-25 10:10 ` rguenth at gcc dot gnu.org
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: rsandifo at gcc dot gnu.org @ 2024-06-25  8:23 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #2 from Richard Sandiford <rsandifo at gcc dot gnu.org> ---
I suppose for issues like this, it would be useful to have a debug counter to
bisect on.  I'll post a patch for doing that today, but I'm afraid I'll be
relying on someone with gcn access to actually do the bisection.

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

* [Bug target/115631] [15 Regression] GCN: [-PASS:-]{+FAIL:+} c-c++-common/torture/builtin-arith-overflow-6.c   -O2  execution test
  2024-06-25  7:52 [Bug target/115631] New: [15 Regression] GCN: [-PASS:-]{+FAIL:+} c-c++-common/torture/builtin-arith-overflow-6.c -O2 execution test tschwinge at gcc dot gnu.org
  2024-06-25  8:04 ` [Bug target/115631] " ams at gcc dot gnu.org
  2024-06-25  8:23 ` rsandifo at gcc dot gnu.org
@ 2024-06-25 10:10 ` rguenth at gcc dot gnu.org
  2024-06-25 12:01 ` rsandifo at gcc dot gnu.org
  2024-06-25 14:10 ` rsandifo at gcc dot gnu.org
  4 siblings, 0 replies; 6+ messages in thread
From: rguenth at gcc dot gnu.org @ 2024-06-25 10:10 UTC (permalink / raw)
  To: gcc-bugs

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

Richard Biener <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|---                         |15.0

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

* [Bug target/115631] [15 Regression] GCN: [-PASS:-]{+FAIL:+} c-c++-common/torture/builtin-arith-overflow-6.c   -O2  execution test
  2024-06-25  7:52 [Bug target/115631] New: [15 Regression] GCN: [-PASS:-]{+FAIL:+} c-c++-common/torture/builtin-arith-overflow-6.c -O2 execution test tschwinge at gcc dot gnu.org
                   ` (2 preceding siblings ...)
  2024-06-25 10:10 ` rguenth at gcc dot gnu.org
@ 2024-06-25 12:01 ` rsandifo at gcc dot gnu.org
  2024-06-25 14:10 ` rsandifo at gcc dot gnu.org
  4 siblings, 0 replies; 6+ messages in thread
From: rsandifo at gcc dot gnu.org @ 2024-06-25 12:01 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #3 from Richard Sandiford <rsandifo at gcc dot gnu.org> ---
I've now pushed a debug counter for late_combine.  Sorry to ask, but could you
bisect on N in -fdbg-cnt=late_combine:N to see which transformation is causing
the problem?

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

* [Bug target/115631] [15 Regression] GCN: [-PASS:-]{+FAIL:+} c-c++-common/torture/builtin-arith-overflow-6.c   -O2  execution test
  2024-06-25  7:52 [Bug target/115631] New: [15 Regression] GCN: [-PASS:-]{+FAIL:+} c-c++-common/torture/builtin-arith-overflow-6.c -O2 execution test tschwinge at gcc dot gnu.org
                   ` (3 preceding siblings ...)
  2024-06-25 12:01 ` rsandifo at gcc dot gnu.org
@ 2024-06-25 14:10 ` rsandifo at gcc dot gnu.org
  4 siblings, 0 replies; 6+ messages in thread
From: rsandifo at gcc dot gnu.org @ 2024-06-25 14:10 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #4 from Richard Sandiford <rsandifo at gcc dot gnu.org> ---
Created attachment 58513
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=58513&action=edit
A patch for a bug seen on arm*-*-*

Also, could you check whether the attached patch makes any difference?  It
fixes a problem seen on arm*-*-*, and I notice GCN also defines
cannot_copy_insn_p.

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

end of thread, other threads:[~2024-06-25 14:10 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-06-25  7:52 [Bug target/115631] New: [15 Regression] GCN: [-PASS:-]{+FAIL:+} c-c++-common/torture/builtin-arith-overflow-6.c -O2 execution test tschwinge at gcc dot gnu.org
2024-06-25  8:04 ` [Bug target/115631] " ams at gcc dot gnu.org
2024-06-25  8:23 ` rsandifo at gcc dot gnu.org
2024-06-25 10:10 ` rguenth at gcc dot gnu.org
2024-06-25 12:01 ` rsandifo at gcc dot gnu.org
2024-06-25 14:10 ` rsandifo 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).