What does 'Cannot yet select: intrinsic %llvm.x86.sse41.dpps' mean?
| Bugzilla Link | 6115 |
| Resolution | WORKSFORME |
| Resolved on | Feb 02, 2010 16:00 |
| Version | 2.6 |
| OS | Linux |
| Attachments | LLVM assembly program that causes llvmc to abort with the strange message |
| CC | @lattner,@echristo |
Extended Description
In the attached LLVM assembly program I have manually replaced some vector manipulations by the dot product instruction of ix86's SSE4 extension. When I compile the file I get $ llvmc -S dpps-test.ll Cannot yet select: LLVM ERROR: Cannot yet select: intrinsic %llvm.x86.sse41.dpps
What does it mean? Have I used the intrinsic in a wrong way, or is it just not implemented? Or is the compiler uncertain about the CodeGen target?
FWIW llc is the easiest way to turn a .ll to a .s file.
llvmc isnt' really production quality. Why did you use it? Is there something suggesting that you use llvmc?
Because it seems to be the simplest way to turn an .ll file into an .s file. I need this for debugging.
Btw. I did find out, why LLVM refused to select the dpps intrinsic: The tested machine did not support SSE4.1. :-(
llvmc isnt' really production quality. Why did you use it? Is there something suggesting that you use llvmc?
Nice, I can get the dot product to the assembly file using $ llc -mattr=+sse41 -f dpps-test.bc or $ llvmc -S -Wllc,=-mattr=+sse41 dpps-test.ll
So, really a documentation issue. Thus, if bugtracker counts as documentation too, we have now documented that the message "Cannot yet select: LLVM ERROR: Cannot yet select: intrinsic %llvm.x86.sse41.dpps" means that you should check the -mattr option.
@ #3 I use Haskell to generate the code on the fly. In the final application there won't be any LLVM assembly or Bitcode file written to the disk.
You probably have to pass -msse4.1 or something. I don't know if llvmc supports this, why not use clang or llvm-gcc directly?
I have generated the code basically using Lennart Augustsson's LLVM interface for Haskell: http://hackage.haskell.org/package/llvm-0.7.0.0 This worked, but then I wanted to get more speed out of it, by replacing a manually written dot product by the built-in Intel instruction dpps. To this end I have outcommented the manual dot product, added some dummy instructions in order to keep the register numbering contiguous and called and declared the dpps intrinsics.
Btw. if I alter call and declaration to a non-existing intrinsic, say dpp, then assembler succeeds and emits a plain external call. If I switch to the dot product for doubles (dppd) the assembler correctly spots the type mismatch.
It will definitely mean one of those 3 things. I'll look at the .ll file, however, can you generate this using C code? Was there a problem with the llvm ir in the first place?