From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id A7046385781F; Fri, 1 Sep 2023 12:55:45 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org A7046385781F DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1693572945; bh=HJ+Hn/cLQUecbURl/Q8tZBOghBws01ONsqQmaaJkQS4=; h=From:To:Subject:Date:From; b=oBKsF6Odlb28/ylKSr6aT9fsL58DCK3ERqajqHXLzXICOUN8RDSzTkOs4PMtS9ZJU uhkB/yiAq5wrtOmXeUnTE8xunD9lyDecwG2ae9xTWGOLxJHYie0GfCYJvuojkCpOCX QUcP6nCvn5g/99WBdCPfJaO1HzGhmGsB5ibKK1KQ= From: "manolis.tsamis at vrull dot eu" To: gcc-bugs@gcc.gnu.org Subject: [Bug rtl-optimization/111267] New: Codegen regression from i386 argument passing changes Date: Fri, 01 Sep 2023 12:55:45 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: rtl-optimization X-Bugzilla-Version: 14.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: manolis.tsamis at vrull dot eu X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version bug_status bug_severity priority component assigned_to reporter cc target_milestone Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 List-Id: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D111267 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 <=3D b.maxx && a.miny <=3D b.maxy && a.maxx >=3D b.minx && a.maxx >=3D b.minx; } int TestOverlap2(AABB a, AABB b) { return a.miny <=3D b.maxy && a.maxx >=3D b.minx; } has regressed due to commit https://gcc.gnu.org/git/?p=3Dgcc.git;a=3Dcommit;h=3Dbdf2737cda53a83332db1a1= a021653447b05a7e7 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)=