From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id ACC413858C54; Tue, 12 Apr 2022 06:46:27 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org ACC413858C54 From: "rguenther at suse dot de" To: gcc-bugs@gcc.gnu.org Subject: [Bug target/105206] mis-optimization with -ffast-math and __builtin_powf Date: Tue, 12 Apr 2022 06:46:27 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: target X-Bugzilla-Version: 12.0 X-Bugzilla-Keywords: missed-optimization X-Bugzilla-Severity: minor X-Bugzilla-Who: rguenther at suse dot de X-Bugzilla-Status: WAITING 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: Message-ID: In-Reply-To: References: 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 X-BeenThere: gcc-bugs@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-bugs mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 12 Apr 2022 06:46:27 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D105206 --- Comment #6 from rguenther at suse dot de --- On Mon, 11 Apr 2022, kargl at gcc dot gnu.org wrote: > https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D105206 >=20 > --- Comment #3 from kargl at gcc dot gnu.org --- > (In reply to Richard Biener from comment #2) > > Hm, it works for me on linux with glibc, can you be more specific as to= what > > OS/libc (version) you are using? > >=20 > > foof: > > .LFB0: > > .cfi_startproc > > mulss .LC0(%rip), %xmm0 > > jmp expf > >=20 > > food: > > .LFB1: > > .cfi_startproc > > mulsd .LC1(%rip), %xmm0 > > jmp exp >=20 > Richard, I'm using x86_64-*-freebsd. I just checked with powl(), and got= =20 > fool: > .LFB5: > .cfi_startproc > pushq %rbp > .cfi_def_cfa_offset 16 > .cfi_offset 6, -16 > movq %rsp, %rbp > .cfi_def_cfa_register 6 > subq $16, %rsp > flds .LC0(%rip) > pushq 24(%rbp) > pushq 16(%rbp) > fstpt -16(%rbp) > movq -16(%rbp), %rax > movl -8(%rbp), %edx > pushq %rdx > pushq %rax > call powl > addq $32, %rsp > leave > .cfi_def_cfa 7, 8 > ret > .cfi_endproc >=20 > with -ffast-math. >=20 > This might be related to PR89125. The patch I attached to that PR has ne= ver > found its way into the repository. I'll do some more testing later today. Ah, yeah - that old issue, indeed good to revisit that.=