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

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).