From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 6900A3858C56; Mon, 11 Apr 2022 19:21:52 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 6900A3858C56 From: "sgk at troutmask dot apl.washington.edu" To: gcc-bugs@gcc.gnu.org Subject: [Bug middle-end/105206] mis-optimization with -ffast-math and __builtin_powf Date: Mon, 11 Apr 2022 19:21:52 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: middle-end X-Bugzilla-Version: 12.0 X-Bugzilla-Keywords: missed-optimization X-Bugzilla-Severity: minor X-Bugzilla-Who: sgk at troutmask dot apl.washington.edu 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: Mon, 11 Apr 2022 19:21:52 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D105206 --- Comment #4 from Steve Kargl -= -- On Mon, Apr 11, 2022 at 02:45:22PM +0000, kargl at gcc dot gnu.org wrote: >=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. >=20 Yep. This is related to PR89125. GCC does not use configure to check for the availability of individual C99 libm functions. After updating the patch in PR89125 for the *.c to *.cc migration the patch gcc gives foof: .LFB3: .cfi_startproc mulss .LC0(%rip), %xmm0 jmp expf .cfi_endproc food: .LFB4: .cfi_startproc mulsd .LC1(%rip), %xmm0 jmp exp .cfi_endproc fool: .LFB5: .cfi_startproc pushq %rbp .cfi_def_cfa_offset 16 .cfi_offset 6, -16 movq %rsp, %rbp .cfi_def_cfa_register 6 fldt 16(%rbp) popq %rbp .cfi_def_cfa 7, 8 fldt .LC2(%rip) fmulp %st, %st(1) fldl2e fmulp %st, %st(1) fld %st(0) frndint fsubr %st, %st(1) fxch %st(1) f2xm1 fld1 faddp %st, %st(1) fscale fstp %st(1) ret .cfi_endproc=