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

            Bug ID: 16403
           Summary: Add support for '__builtin_ia32_sqrtps_nr256’
           Product: dragonegg
           Version: unspecified
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: New Bugs
          Assignee: [email protected]
          Reporter: [email protected]
                CC: [email protected]
    Classification: Unclassified

The following code snippet
#########
#include <math.h>

float calc(float *x)
{
      float sum;
      for (int j = 0; j < 1024; j++)
      {
          const float drSquared = x[j] * x[j];
          sum += 1.0f / (drSquared * sqrtf(drSquared));
      }
      return sum; // ensure it is not optimized away
}
#########

saved as loop.c can not be compiled using

####
gcc-4.8 -lm -fplugin=/home/thomas/devel/dragonegg-3.3.src-gcc-4.8/dragonegg.so
-std=c99 -O3 -ffast-math -march=corei7-avx
-fplugin-arg-dragonegg-enable-gcc-optzns loop.c -S -o dragonegg-with-gcc-opts.s
####

because of

####
loop.c: In function ‘calc’:
loop.c:9:43: error: unsupported target builtin ‘__builtin_ia32_sqrtps_nr256’
use
####

Compiling with gcc 4.8, clang 3.3 or without the
-fplugin-arg-dragonegg-enable-gcc-optzns flag works.

Versions:
#####
gcc-4.8 (Debian 4.8.1-3) 4.8.1
dragonegg-3.3 compiled from source
clang --version
Debian clang version 3.3-1 (branches/release_33) (based on LLVM 3.3)
Target: x86_64-pc-linux-gnu
Thread model: posix
debian unstable
####

Thanks for reading
Thomas

-- 
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
LLVMbugs mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/llvmbugs

Reply via email to