[cfe-dev] clang O3/O2 error for Linpack with NEON instructions

Junaid Shuja via cfe-dev cfe-dev at lists.llvm.org
Mon Mar 7 23:44:13 PST 2016


I am using code Neonlinpack code from,
[http://www.roylongbottom.org.uk/Raspberry_Pi_Benchmarks.zip]

When I compile it with clang without any optimization flags, it runs
OK. But when I use O3/O2 flags in command,

clang -target armv7a-linux-gnueabihf -mfpu=neon -mfloat-abi=hard
linpackneon.c cpuidc.c -O3 -o linpackneon

I get the following errors

In file included from cpuidc.c:13:
In file included from /usr/include/math.h:426:
/usr/include/bits/mathinline.h:756:25: error: invalid output constraint '=&q' in
      asm
                    : "=t" (__value), "=&q" (__ignore), "=m" (__cwtmp),       \
                                      ^
/usr/include/bits/mathinline.h:756:25: error: invalid output constraint '=&q' in
      asm
/usr/include/bits/mathinline.h:756:25: error: invalid output constraint '=&q' in
      asm
/usr/include/bits/mathinline.h:774:25: error: invalid output constraint '=&q' in
      asm
                    : "=t" (__value), "=&q" (__ignore), "=m" (__cwtmp),       \
                                      ^
/usr/include/bits/mathinline.h:774:25: error: invalid output constraint '=&q' in
      asm
/usr/include/bits/mathinline.h:774:25: error: invalid output constraint '=&q' in
      asm
/usr/include/bits/mathinline.h:881:3: error: unknown register name 'st' in asm
  __lrint_code;
  ^
/usr/include/bits/mathinline.h:876:40: note: expanded from macro '__lrint_code'
     : "=m" (__lrintres) : "t" (__x) : "st");

Can anybody help me with this issue. I am trying to compare the
auto-vectorizing of clang with gcc.

-- 
Junaid Shuja
WHA130039
PhD Student, FSKTM
University of Malaya


More information about the cfe-dev mailing list