public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug target/102227] New: [12 Regression] Likely wrong code since r12-3376-g13beaf9e8d2d8264c0ad8f6504793fdcf26f3f73
@ 2021-09-07  9:02 marxin at gcc dot gnu.org
  2021-09-07  9:03 ` [Bug target/102227] " marxin at gcc dot gnu.org
                   ` (6 more replies)
  0 siblings, 7 replies; 8+ messages in thread
From: marxin at gcc dot gnu.org @ 2021-09-07  9:02 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 102227
           Summary: [12 Regression] Likely wrong code since
                    r12-3376-g13beaf9e8d2d8264c0ad8f6504793fdcf26f3f73
           Product: gcc
           Version: 12.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: target
          Assignee: unassigned at gcc dot gnu.org
          Reporter: marxin at gcc dot gnu.org
                CC: hjl.tools at gmail dot com
            Blocks: 26163
  Target Milestone: ---

Since the revision, 434.zeusmp and other SPEC benchmarks do fail with
-march=native -Ofast on AMD znver1 and Intel skylake.

I isolated that the affected source file is tranx3.f, where I can see a couple
of assembly changes like:

Before:

        vmulsd  gridcomr_+44688(,%rax,8), %xmm2, %xmm2
        vaddsd  %xmm2, %xmm0, %xmm1
        vmulsd  %xmm2, %xmm0, %xmm0
        vxorpd  %xmm2, %xmm2, %xmm2
        vmaxsd  %xmm2, %xmm0, %xmm0
        vmovsd  %xmm1, %xmm1, %xmm2
        vandpd  .LC1(%rip), %xmm2, %xmm2
        vxorpd  %xmm0, %xmm2, %xmm2
        vandpd  .LC2(%rip), %xmm1, %xmm0
        vmovsd  .LC3(%rip), %xmm1
        vmaxsd  %xmm1, %xmm0, %xmm0
        vdivsd  %xmm0, %xmm2, %xmm0
        vmovsd  %xmm0, 856(%rsp,%rbx,8)
.L102:

After:

        vmulsd  gridcomr_+44688(,%rbx,8), %xmm0, %xmm0
        vsubsd  %xmm2, %xmm1, %xmm2
        vmulsd  gridcomr_+44688(,%rax,8), %xmm2, %xmm2
        vaddsd  %xmm2, %xmm0, %xmm1
        vandpd  .LC1(%rip), %xmm1, %xmm1
        vmulsd  %xmm2, %xmm0, %xmm0
        vxorpd  %xmm2, %xmm2, %xmm2
        vmaxsd  %xmm2, %xmm0, %xmm0
        vmovsd  .LC3(%rip), %xmm2
        vxorpd  %xmm0, %xmm1, %xmm0
        vandpd  .LC2(%rip), %xmm1, %xmm1
        vmaxsd  %xmm2, %xmm1, %xmm1
        vdivsd  %xmm1, %xmm0, %xmm0
        vmovsd  %xmm0, 856(%rsp,%rbx,8)
.L102:

@H.J. Can you please take a look? It's not easy to reproduce a smaller
test-case ..


Referenced Bugs:

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=26163
[Bug 26163] [meta-bug] missed optimization in SPEC (2k17, 2k and 2k6 and 95)

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

* [Bug target/102227] [12 Regression] Likely wrong code since r12-3376-g13beaf9e8d2d8264c0ad8f6504793fdcf26f3f73
  2021-09-07  9:02 [Bug target/102227] New: [12 Regression] Likely wrong code since r12-3376-g13beaf9e8d2d8264c0ad8f6504793fdcf26f3f73 marxin at gcc dot gnu.org
@ 2021-09-07  9:03 ` marxin at gcc dot gnu.org
  2021-09-07  9:05 ` pinskia at gcc dot gnu.org
                   ` (5 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: marxin at gcc dot gnu.org @ 2021-09-07  9:03 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|---                         |12.0
           Priority|P3                          |P1

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

* [Bug target/102227] [12 Regression] Likely wrong code since r12-3376-g13beaf9e8d2d8264c0ad8f6504793fdcf26f3f73
  2021-09-07  9:02 [Bug target/102227] New: [12 Regression] Likely wrong code since r12-3376-g13beaf9e8d2d8264c0ad8f6504793fdcf26f3f73 marxin at gcc dot gnu.org
  2021-09-07  9:03 ` [Bug target/102227] " marxin at gcc dot gnu.org
@ 2021-09-07  9:05 ` pinskia at gcc dot gnu.org
  2021-09-07 18:53 ` [Bug target/102227] [12 Regression] Likely wrong code since r12-3369-g652bef70d392f9541b12ef65b461009c8c8fd54a pinskia at gcc dot gnu.org
                   ` (4 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: pinskia at gcc dot gnu.org @ 2021-09-07  9:05 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
           See Also|                            |https://gcc.gnu.org/bugzill
                   |                            |a/show_bug.cgi?id=102224

--- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
PR 102224 is most likely related.

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

* [Bug target/102227] [12 Regression] Likely wrong code since r12-3369-g652bef70d392f9541b12ef65b461009c8c8fd54a
  2021-09-07  9:02 [Bug target/102227] New: [12 Regression] Likely wrong code since r12-3376-g13beaf9e8d2d8264c0ad8f6504793fdcf26f3f73 marxin at gcc dot gnu.org
  2021-09-07  9:03 ` [Bug target/102227] " marxin at gcc dot gnu.org
  2021-09-07  9:05 ` pinskia at gcc dot gnu.org
@ 2021-09-07 18:53 ` pinskia at gcc dot gnu.org
  2021-09-08 10:12 ` marxin at gcc dot gnu.org
                   ` (3 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: pinskia at gcc dot gnu.org @ 2021-09-07 18:53 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
         Resolution|---                         |DUPLICATE
           Keywords|                            |wrong-code

--- Comment #2 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
Looks like it was always broken and is the same issue as reported in PR 102224
just getting exposed even more.

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

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

* [Bug target/102227] [12 Regression] Likely wrong code since r12-3369-g652bef70d392f9541b12ef65b461009c8c8fd54a
  2021-09-07  9:02 [Bug target/102227] New: [12 Regression] Likely wrong code since r12-3376-g13beaf9e8d2d8264c0ad8f6504793fdcf26f3f73 marxin at gcc dot gnu.org
                   ` (2 preceding siblings ...)
  2021-09-07 18:53 ` [Bug target/102227] [12 Regression] Likely wrong code since r12-3369-g652bef70d392f9541b12ef65b461009c8c8fd54a pinskia at gcc dot gnu.org
@ 2021-09-08 10:12 ` marxin at gcc dot gnu.org
  2021-09-08 10:13 ` pinskia at gcc dot gnu.org
                   ` (2 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: marxin at gcc dot gnu.org @ 2021-09-08 10:12 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
     Ever confirmed|0                           |1
                 CC|                            |jakub at gcc dot gnu.org
         Resolution|DUPLICATE                   |---
   Last reconfirmed|                            |2021-09-08
             Status|RESOLVED                    |REOPENED

--- Comment #3 from Martin Liška <marxin at gcc dot gnu.org> ---
After r12-3413-ga7b626d98a9a821ffb33466818d6aa86cac1d6fd, I still see the
miscompilation in the mentioned file.

@Jakub: Can one somehow bisect which XORSIGN pattern causes that?

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

* [Bug target/102227] [12 Regression] Likely wrong code since r12-3369-g652bef70d392f9541b12ef65b461009c8c8fd54a
  2021-09-07  9:02 [Bug target/102227] New: [12 Regression] Likely wrong code since r12-3376-g13beaf9e8d2d8264c0ad8f6504793fdcf26f3f73 marxin at gcc dot gnu.org
                   ` (3 preceding siblings ...)
  2021-09-08 10:12 ` marxin at gcc dot gnu.org
@ 2021-09-08 10:13 ` pinskia at gcc dot gnu.org
  2021-09-08 10:25 ` marxin at gcc dot gnu.org
  2021-09-08 12:14 ` marxin at gcc dot gnu.org
  6 siblings, 0 replies; 8+ messages in thread
From: pinskia at gcc dot gnu.org @ 2021-09-08 10:13 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #4 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
(In reply to Martin Liška from comment #3)
> After r12-3413-ga7b626d98a9a821ffb33466818d6aa86cac1d6fd, I still see the
> miscompilation in the mentioned file.
> 
> @Jakub: Can one somehow bisect which XORSIGN pattern causes that?

See PR 89984.

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

* [Bug target/102227] [12 Regression] Likely wrong code since r12-3369-g652bef70d392f9541b12ef65b461009c8c8fd54a
  2021-09-07  9:02 [Bug target/102227] New: [12 Regression] Likely wrong code since r12-3376-g13beaf9e8d2d8264c0ad8f6504793fdcf26f3f73 marxin at gcc dot gnu.org
                   ` (4 preceding siblings ...)
  2021-09-08 10:13 ` pinskia at gcc dot gnu.org
@ 2021-09-08 10:25 ` marxin at gcc dot gnu.org
  2021-09-08 12:14 ` marxin at gcc dot gnu.org
  6 siblings, 0 replies; 8+ messages in thread
From: marxin at gcc dot gnu.org @ 2021-09-08 10:25 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
           See Also|                            |https://gcc.gnu.org/bugzill
                   |                            |a/show_bug.cgi?id=89984

--- Comment #5 from Martin Liška <marxin at gcc dot gnu.org> ---
(In reply to Andrew Pinski from comment #4)
> (In reply to Martin Liška from comment #3)
> > After r12-3413-ga7b626d98a9a821ffb33466818d6aa86cac1d6fd, I still see the
> > miscompilation in the mentioned file.
> > 
> > @Jakub: Can one somehow bisect which XORSIGN pattern causes that?
> 
> See PR 89984.

Thanks!

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

* [Bug target/102227] [12 Regression] Likely wrong code since r12-3369-g652bef70d392f9541b12ef65b461009c8c8fd54a
  2021-09-07  9:02 [Bug target/102227] New: [12 Regression] Likely wrong code since r12-3376-g13beaf9e8d2d8264c0ad8f6504793fdcf26f3f73 marxin at gcc dot gnu.org
                   ` (5 preceding siblings ...)
  2021-09-08 10:25 ` marxin at gcc dot gnu.org
@ 2021-09-08 12:14 ` marxin at gcc dot gnu.org
  6 siblings, 0 replies; 8+ messages in thread
From: marxin at gcc dot gnu.org @ 2021-09-08 12:14 UTC (permalink / raw)
  To: gcc-bugs

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

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

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

--- Comment #6 from Martin Liška <marxin at gcc dot gnu.org> ---
Fixed after g:7485a52551d71db2e8bbfc4c484196bcc321a1cd.

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

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

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-09-07  9:02 [Bug target/102227] New: [12 Regression] Likely wrong code since r12-3376-g13beaf9e8d2d8264c0ad8f6504793fdcf26f3f73 marxin at gcc dot gnu.org
2021-09-07  9:03 ` [Bug target/102227] " marxin at gcc dot gnu.org
2021-09-07  9:05 ` pinskia at gcc dot gnu.org
2021-09-07 18:53 ` [Bug target/102227] [12 Regression] Likely wrong code since r12-3369-g652bef70d392f9541b12ef65b461009c8c8fd54a pinskia at gcc dot gnu.org
2021-09-08 10:12 ` marxin at gcc dot gnu.org
2021-09-08 10:13 ` pinskia at gcc dot gnu.org
2021-09-08 10:25 ` marxin at gcc dot gnu.org
2021-09-08 12:14 ` marxin 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).