Skip to content

Error compiling repa-algorithms with LLVM

With LLVM 3.0 and 3.1:

$ cabal install repa-examples
Resolving dependencies...
Configuring repa-algorithms-3.2.1.1...
Building repa-algorithms-3.2.1.1...
Preprocessing library repa-algorithms-3.2.1.1...
[ 1 of 10] Compiling Data.Array.Repa.Algorithms.Randomish (
Data/Array/Repa/Algorithms/Randomish.hs,
dist/build/Data/Array/Repa/Algorithms/Randomish.o )

/var/folders/39/s54cw_0x0pg1shz3z8wd3z080000gn/T/cc-IVGvFg.s:18:2:
    error: instruction requires a CPU feature not currently enabled
    jmpl *%eax ## TAILCALL
    ^

With LLVM 2.8:

$ cabal install repa-examples
Resolving dependencies...
Configuring repa-algorithms-3.2.1.1...
Building repa-algorithms-3.2.1.1...
Preprocessing library repa-algorithms-3.2.1.1...
[ 1 of 10] Compiling Data.Array.Repa.Algorithms.Randomish (
Data/Array/Repa/Algorithms/Randomish.hs,
dist/build/Data/Array/Repa/Algorithms/Randomish.o )
LLVM ERROR: Cannot yet select: 0x1010b8310: f64 = sint_to_fp
0x10107ac10 [ORD=1990] [ID=54]
 0x10107ac10: i32,ch = load 0x101805d08, 0x1010b8210,
0x101073310<LD4[%ln4wu]> [ORD=1989] [ID=52]
   0x101805d08: ch = EntryToken [ORD=1978] [ID=0]
   0x1010b8210: i32 = add 0x1010bab10, 0x1010ba810 [ID=51]
     0x1010bab10: i32 = add 0x1010b9e10, 0x101076910 [ID=50]
...
$ xcodebuild -version
Xcode 4.1
Build version 4B110

$ opt --version
Low Level Virtual Machine (http://llvm.org/):
 llvm version 2.8
 Optimized build.
 Built Oct  7 2010 (00:21:19).
 Host: x86_64-apple-darwin11
 Host CPU: i686

 Registered Targets:
   (none)

Compiling a hello-world program works.

This report was from Robby Findler, I haven't managed to reproduce the problem yet though. Submitting the report incase anyone else recognises the problem.

Trac metadata
Trac field Value
Version 7.4.1
Type Bug
TypeOfFailure OtherFailure
Priority normal
Resolution Unresolved
Component Compiler (LLVM)
Test case
Differential revisions
BlockedBy
Related
Blocking
CC
Operating system
Architecture
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information