[Bug target/105206] mis-optimization with -ffast-math and __builtin_powf
rguenther at suse dot de
gcc-bugzilla@gcc.gnu.org
Tue Apr 12 06:46:27 GMT 2022
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105206
--- Comment #6 from rguenther at suse dot de <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=105206
>
> --- 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?
> >
> > foof:
> > .LFB0:
> > .cfi_startproc
> > mulss .LC0(%rip), %xmm0
> > jmp expf
> >
> > food:
> > .LFB1:
> > .cfi_startproc
> > mulsd .LC1(%rip), %xmm0
> > jmp exp
>
> Richard, I'm using x86_64-*-freebsd. I just checked with powl(), and got
> 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
>
> with -ffast-math.
>
> This might be related to PR89125. The patch I attached to that PR has never
> found its way into the repository. I'll do some more testing later today.
Ah, yeah - that old issue, indeed good to revisit that.
More information about the Gcc-bugs
mailing list