[LLVMdev] Why this fails on X86_64 host?

Yabin Hu yabin.hwu at gmail.com
Thu Mar 29 20:50:30 PDT 2012


hi justn,

I have a llvm ir file which is generated by my own code generator.
When I run

*llc -march=ptx64 ./gpu_kernel.ll *

on it, the following error was given

LLVM ERROR: Cannot select: 0x269a7a0: ch = store 0x2666370, 0x2697760,
0x269a2a0, 0x2698d90<ST4[%p_arrayidx5], trunc to i32> [ID=20]
  0x2697760: i64 = add 0x2699ea0, 0x2699590 [ORD=23] [ID=16]
    0x2699ea0: i64 = shl 0x2699fa0, 0x269a6a0 [ORD=22] [ID=13]
      0x2699fa0: i64,ch = CopyFromReg 0x2666370, 0x2699990 [ORD=22] [ID=10]
        0x2699990: i64 = Register %vreg6 [ORD=22] [ID=2]
      0x269a6a0: i32 = Constant<7> [ORD=22] [ID=3]
    0x2699590: i64,ch = CopyFromReg 0x2666370, 0x2699290 [ORD=23] [ID=11]
      0x2699290: i64 = Register %vreg7 [ORD=23] [ID=4]
  0x269a2a0: i32 = add 0x269a0a0, 0x2697f60 [ORD=24] [ID=19]
    0x269a0a0: i32 = add 0x2699490, 0x2697a60 [ORD=24] [ID=18]
      0x2699490: i32,ch = CopyFromReg 0x2666370, 0x2698c90 [ORD=21] [ID=9]
        0x2698c90: i32 = Register %vreg8 [ORD=21] [ID=1]
      0x2697a60: i32 = shl 0x2699da0, 0x2697860 [ORD=24] [ID=15]
        0x2699da0: i32 = truncate 0x2699fa0 [ORD=24] [ID=12]
          0x2699fa0: i64,ch = CopyFromReg 0x2666370, 0x2699990 [ORD=22]
[ID=10]
            0x2699990: i64 = Register %vreg6 [ORD=22] [ID=2]
        0x2697860: i32 = Constant<9> [ORD=24] [ID=5]
    0x2697f60: i32 = shl 0x2697b60, 0x269a4a0 [ORD=24] [ID=17]
      0x2697b60: i32 = truncate 0x2699590 [ORD=24] [ID=14]
        0x2699590: i64,ch = CopyFromReg 0x2666370, 0x2699290 [ORD=23]
[ID=11]
          0x2699290: i64 = Register %vreg7 [ORD=23] [ID=4]
      0x269a4a0: i32 = Constant<2> [ORD=24] [ID=6]
  0x2698d90: i32 = undef [ORD=26] [ID=7]

The ll file is attached here.
Please check this for me.
Thanks a lot!

best regards,
Yabin
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20120330/20e6ada0/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: gpu_kernel.ll
Type: application/octet-stream
Size: 1821 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20120330/20e6ada0/attachment.obj>


More information about the llvm-dev mailing list