Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 05 Apr 2017 01:35:39 +0000
From:      bugzilla-noreply@freebsd.org
To:        freebsd-bugs@FreeBSD.org
Subject:   [Bug 218387] -march=native or any specific CPU seems to produce x87 math a lot
Message-ID:  <bug-218387-8@https.bugs.freebsd.org/bugzilla/>

next in thread | raw e-mail | index | archive | help

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@FreeBSD.org
          Reporter: kungfujesus06@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.


Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-218387-8>