[LLVMbugs] [Bug 16722] New: --march=native misidentification

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Sun Jul 28 00:59:21 PDT 2013


http://llvm.org/bugs/show_bug.cgi?id=16722

            Bug ID: 16722
           Summary: --march=native misidentification
           Product: clang
           Version: 3.3
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: -New Bugs
          Assignee: unassignedclangbugs at nondot.org
          Reporter: elena.v.miles at gmail.com
                CC: llvmbugs at cs.uiuc.edu
    Classification: Unclassified

Compiling with --march=native on one of my machines (a core 2 era Pentium
Dual-Core) misidentifies the chip as penryn instead of core2 (the proper -march
flag for this CPU)

Here's the output of gcc and clang for comparison, as well as /proc/cpuinfo for
reference.

: | gcc -v -E -march=native -
Using built-in specs.
COLLECT_GCC=/usr/x86_64-pc-linux-gnu/gcc-bin/4.5.4/gcc
COLLECT_LTO_WRAPPER=/usr/libexec/gcc/x86_64-pc-linux-gnu/4.5.4/lto-wrapper
Target: x86_64-pc-linux-gnu
Configured with: /var/tmp/portage/sys-devel/gcc-4.5.4/work/gcc-4.5.4/configure
--prefix=/usr --bindir=/usr/x86_64-pc-linux-gnu/gcc-bin/4.5.4
--includedir=/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.4/include
--datadir=/usr/share/gcc-data/x86_64-pc-linux-gnu/4.5.4
--mandir=/usr/share/gcc-data/x86_64-pc-linux-gnu/4.5.4/man
--infodir=/usr/share/gcc-data/x86_64-pc-linux-gnu/4.5.4/info
--with-gxx-include-dir=/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.4/include/g++-v4
--host=x86_64-pc-linux-gnu --build=x86_64-pc-linux-gnu --disable-altivec
--disable-fixed-point --without-cloog --without-ppl --disable-lto --enable-nls
--without-included-gettext --with-system-zlib --enable-obsolete
--disable-werror --enable-secureplt --enable-multilib --enable-libmudflap
--disable-libssp --enable-libgomp
--with-python-dir=/share/gcc-data/x86_64-pc-linux-gnu/4.5.4/python
--enable-checking=release --enable-libstdcxx-time --enable-objc-gc
--enable-languages=c,c++,java,objc,obj-c++,fortran --enable-shared
--enable-threads=posix --enable-__cxa_atexit --enable-clocale=gnu
--enable-targets=all --with-bugurl=http://bugs.gentoo.org/
--with-pkgversion='Gentoo 4.5.4 p1.2, pie-0.4.7'
Thread model: posix
gcc version 4.5.4 (Gentoo 4.5.4 p1.2, pie-0.4.7) 
COLLECT_GCC_OPTIONS='-v' '-E' 
 /usr/libexec/gcc/x86_64-pc-linux-gnu/4.5.4/cc1 -E -quiet -v -
-D_FORTIFY_SOURCE=2 -march=core2 -mcx16 -msahf --param l1-cache-size=32 --param
l1-cache-line-size=64 --param l2-cache-size=2048 -mtune=core2
ignoring nonexistent directory "/usr/local/include"
ignoring nonexistent directory
"/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.4/../../../../x86_64-pc-linux-gnu/include"
#include "..." search starts here:
#include <...> search starts here:
 /usr/lib/gcc/x86_64-pc-linux-gnu/4.5.4/include
 /usr/lib/gcc/x86_64-pc-linux-gnu/4.5.4/include-fixed
 /usr/include
End of search list.
# 1 "<stdin>"
# 1 "<built-in>"
# 1 "<command-line>"
# 1 "<stdin>"
COMPILER_PATH=/usr/libexec/gcc/x86_64-pc-linux-gnu/4.5.4/:/usr/libexec/gcc/x86_64-pc-linux-gnu/4.5.4/:/usr/libexec/gcc/x86_64-pc-linux-gnu/:/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.4/:/usr/lib/gcc/x86_64-pc-linux-gnu/:/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.4/../../../../x86_64-pc-linux-gnu/bin/
LIBRARY_PATH=/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.4/:/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.4/../../../../lib64/:/lib/../lib64/:/usr/lib/../lib64/:/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.4/../../../../x86_64-pc-linux-gnu/lib/:/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.4/../../../:/lib/:/usr/lib/
COLLECT_GCC_OPTIONS='-v' '-E' 


: | clang -v -E -march=native -
clang version 3.3 (tags/RELEASE_33/final)
Target: x86_64-pc-linux-gnu
Thread model: posix
 "/usr/bin/clang" -cc1 -triple x86_64-pc-linux-gnu -E -disable-free
-disable-llvm-verifier -main-file-name - -mrelocation-model static
-mdisable-fp-elim -fmath-errno -masm-verbose -mconstructor-aliases
-munwind-tables -target-cpu penryn -target-linker-version 2.23.1 -v
-resource-dir /usr/bin/../lib64/clang/3.3 -internal-isystem /usr/local/include
-internal-isystem /usr/bin/../lib64/clang/3.3/include -internal-externc-isystem
/include -internal-externc-isystem /usr/include -fdebug-compilation-dir
/home/elena -ferror-limit 19 -fmessage-length 126 -mstackrealign
-fobjc-runtime=gcc -fobjc-default-synthesize-properties
-fdiagnostics-show-option -fcolor-diagnostics -backend-option -vectorize-loops
-o - -x c -
clang -cc1 version 3.3 based upon LLVM 3.3 default target x86_64-pc-linux-gnu
ignoring nonexistent directory "/usr/local/include"
ignoring nonexistent directory "/include"
#include "..." search starts here:
#include <...> search starts here:
 /usr/bin/../lib64/clang/3.3/include
 /usr/include
End of search list.
# 1 "<stdin>"
# 1 "<built-in>" 1
# 1 "<built-in>" 3
# 162 "<built-in>" 3
# 1 "<command line>" 1
# 1 "<built-in>" 2
# 1 "<stdin>" 2


cat /proc/cpuinfo
processor       : 0
vendor_id       : GenuineIntel
cpu family      : 6
model           : 23
model name      : Pentium(R) Dual-Core  CPU      E5300  @ 2.60GHz
stepping        : 10
microcode       : 0xa07
cpu MHz         : 2603.000
cache size      : 2048 KB
physical id     : 0
siblings        : 2
core id         : 0
cpu cores       : 2
apicid          : 0
initial apicid  : 0
fpu             : yes
fpu_exception   : yes
cpuid level     : 13
wp              : yes
flags           : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov
pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx lm
constant_tsc arch_perfmon pebs bts rep_good nopl aperfmperf pni dtes64 monitor
ds_cpl vmx est tm2 ssse3 cx16 xtpr pdcm xsave lahf_lm dtherm tpr_shadow vnmi
flexpriority
bogomips        : 5188.99
clflush size    : 64
cache_alignment : 64
address sizes   : 36 bits physical, 48 bits virtual
power management:

processor       : 1
vendor_id       : GenuineIntel
cpu family      : 6
model           : 23
model name      : Pentium(R) Dual-Core  CPU      E5300  @ 2.60GHz
stepping        : 10
microcode       : 0xa07
cpu MHz         : 2603.000
cache size      : 2048 KB
physical id     : 0
siblings        : 2
core id         : 1
cpu cores       : 2
apicid          : 1
initial apicid  : 1
fpu             : yes
fpu_exception   : yes
cpuid level     : 13
wp              : yes
flags           : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov
pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx lm
constant_tsc arch_perfmon pebs bts rep_good nopl aperfmperf pni dtes64 monitor
ds_cpl vmx est tm2 ssse3 cx16 xtpr pdcm xsave lahf_lm dtherm tpr_shadow vnmi
flexpriority
bogomips        : 5188.99
clflush size    : 64
cache_alignment : 64
address sizes   : 36 bits physical, 48 bits virtual
power management:

-- 
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20130728/b6edd29b/attachment.html>


More information about the llvm-bugs mailing list