public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug rtl-optimization/111267] New: Codegen regression from i386 argument passing changes
@ 2023-09-01 12:55 manolis.tsamis at vrull dot eu
  2023-09-12 10:43 ` [Bug rtl-optimization/111267] [14 Regression] " rguenth at gcc dot gnu.org
                   ` (16 more replies)
  0 siblings, 17 replies; 18+ messages in thread
From: manolis.tsamis at vrull dot eu @ 2023-09-01 12:55 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 111267
           Summary: Codegen regression from i386 argument passing changes
           Product: gcc
           Version: 14.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: rtl-optimization
          Assignee: unassigned at gcc dot gnu.org
          Reporter: manolis.tsamis at vrull dot eu
                CC: roger at nextmovesoftware dot com, ubizjak at gmail dot com
  Target Milestone: ---

Code generation for the following testcase:

typedef struct {
  float minx, miny;
  float maxx, maxy;
} AABB;

int TestOverlap(AABB a, AABB b) {
  return a.minx <= b.maxx
      && a.miny <= b.maxy
      && a.maxx >= b.minx
      && a.maxx >= b.minx;
}

int TestOverlap2(AABB a, AABB b) {
  return a.miny <= b.maxy
      && a.maxx >= b.minx;
}

has regressed due to commit
https://gcc.gnu.org/git/?p=gcc.git;a=commit;h=bdf2737cda53a83332db1a1a021653447b05a7e7

GCC13.2:

TestOverlap:
        comiss  xmm3, xmm0
        movq    rdx, xmm0
        movq    rsi, xmm1
        movq    rax, xmm3
        jb      .L10
        shr     rdx, 32
        shr     rax, 32
        movd    xmm0, eax
        movd    xmm4, edx
        comiss  xmm0, xmm4
        jb      .L10
        movd    xmm1, esi
        xor     eax, eax
        comiss  xmm1, xmm2
        setnb   al
        ret
.L10:
        xor     eax, eax
        ret
TestOverlap2:
        shufps  xmm0, xmm0, 85
        shufps  xmm3, xmm3, 85
        comiss  xmm3, xmm0
        jb      .L17
        xor     eax, eax
        comiss  xmm1, xmm2
        setnb   al
        ret
.L17:
        xor     eax, eax
        ret

GCC trunk:

TestOverlap:
        movq    rax, xmm1
        movq    rdx, xmm2
        movq    rsi, xmm0
        mov     rdi, rax
        movq    rax, xmm3
        mov     rcx, rsi
        xchg    rdx, rax
        movd    xmm1, edx
        mov     rsi, rax
        mov     rax, rdx
        comiss  xmm1, xmm0
        jb      .L10
        shr     rcx, 32
        shr     rax, 32
        movd    xmm0, eax
        movd    xmm4, ecx
        comiss  xmm0, xmm4
        jb      .L10
        movd    xmm0, esi
        movd    xmm1, edi
        xor     eax, eax
        comiss  xmm1, xmm0
        setnb   al
        ret
.L10:
        xor     eax, eax
        ret
TestOverlap2:
        movq    rdx, xmm2
        movq    rax, xmm3
        movq    rsi, xmm0
        xchg    rdx, rax
        mov     rcx, rsi
        mov     rsi, rax
        mov     rax, rdx
        shr     rcx, 32
        shr     rax, 32
        movd    xmm4, ecx
        movd    xmm0, eax
        comiss  xmm0, xmm4
        jb      .L17
        movd    xmm0, esi
        xor     eax, eax
        comiss  xmm1, xmm0
        setnb   al
        ret
.L17:
        xor     eax, eax
        ret

(Can also be seen here https://godbolt.org/z/E4xrEn6KW)

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

end of thread, other threads:[~2024-02-16  9:12 UTC | newest]

Thread overview: 18+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-09-01 12:55 [Bug rtl-optimization/111267] New: Codegen regression from i386 argument passing changes manolis.tsamis at vrull dot eu
2023-09-12 10:43 ` [Bug rtl-optimization/111267] [14 Regression] " rguenth at gcc dot gnu.org
2023-10-17 12:34 ` rguenth at gcc dot gnu.org
2023-10-20 22:42 ` roger at nextmovesoftware dot com
2023-10-20 22:49 ` roger at nextmovesoftware dot com
2024-01-05 10:43 ` jakub at gcc dot gnu.org
2024-01-12 15:49 ` jakub at gcc dot gnu.org
2024-01-12 19:06 ` roger at nextmovesoftware dot com
2024-01-14  0:09 ` roger at nextmovesoftware dot com
2024-01-14 12:10 ` roger at nextmovesoftware dot com
2024-01-15  7:32 ` rguenth at gcc dot gnu.org
2024-01-16  1:15 ` roger at nextmovesoftware dot com
2024-01-21 21:25 ` cvs-commit at gcc dot gnu.org
2024-01-22  9:11 ` rsandifo at gcc dot gnu.org
2024-01-25  7:51 ` mkuvyrkov at gcc dot gnu.org
2024-01-25  7:55 ` clyon at gcc dot gnu.org
2024-01-25  9:48 ` mkuvyrkov at gcc dot gnu.org
2024-02-16  9:12 ` roger at nextmovesoftware 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).