[Bug 218387] -march=native or any specific CPU seems to produce x87 math a lot
bugzilla-noreply at freebsd.org
bugzilla-noreply at freebsd.org
Wed Apr 5 01:35:39 UTC 2017
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=218387
Bug ID: 218387
Summary: -march=native or any specific CPU seems to produce x87
math a lot
Product: Base System
Version: CURRENT
Hardware: amd64
OS: Any
Status: New
Severity: Affects Only Me
Priority: ---
Component: bin
Assignee: freebsd-bugs at FreeBSD.org
Reporter: kungfujesus06 at gmail.com
I think this is a bug, but perhaps I just think it is because the behavior
diverges from GCC by quite a bit.
When you compile an application that does floating point math with clang in
current right now, specifying -march=native or -march=sandybridge or btver2 or
any number of CPUs I tried to target produces predominantly x87 instructions.
Typically GCC and most other compilers I've seen default to targeting SSE
instructions, instead.
If you specify -march=x86-64, you get the results you'd expect (predominantly
SSE2 instructions for floating point). This leads me to believe this is a bug,
for most everything SSE units should be the most optimal.
--
You are receiving this mail because:
You are the assignee for the bug.
More information about the freebsd-bugs
mailing list