[LLVMbugs] [Bug 15333] New: Cannot select: intrinsic %llvm.spu.si.sf

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Fri Feb 22 05:57:11 PST 2013


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

            Bug ID: 15333
           Summary: Cannot select: intrinsic %llvm.spu.si.sf
           Product: clang
           Version: 3.2
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: LLVM Codegen
          Assignee: unassignedclangbugs at nondot.org
          Reporter: alexander at jesner.eu
                CC: llvmbugs at cs.uiuc.edu
    Classification: Unclassified

It seems, the following code cannot be compiled:

void main() {
  int N = 100;
  double f[N];
}

> clang -std=c99 -c test.c -o test.a
fatal error: error in backend: Cannot select: intrinsic %llvm.spu.si.sf


changing N to `const int` will make the program work. This makes sense.
I don't know what the C99 Standard says on this, but if using a non-const is
not valid, at least the error message should be more "legible". 

For comparison: `gcc -std=c99 -Wall test.c` does not complain at all if N is
non-const and produces a working binary.

More information can be found on StackOverflow:
http://stackoverflow.com/questions/15023592/llvm-cannot-select-intrinsic-llvm-spu-si-sf

My Clang version:

Ubuntu clang version 3.2-1~exp5ubuntu2 (tags/RELEASE_32/final) (based on LLVM
3.2)
Target: x86_64-pc-linux-gnu
Thread model: posix

-- 
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/20130222/c2e5c42c/attachment.html>


More information about the llvm-bugs mailing list