Hey,
i am trying to build a simple kernel (see attachments) to test some implementation of a random number generator. However calling into clBuildProgram everything crashes with the following error message:
LLVM ERROR: Cannot select: 0xf57d440: i64,i64 = shl_parts Constant:i64<1>, Constant:i64<0>, 0xf57d350
0xf57d800: i64 = Constant<1>
0xf582580: i64 = Constant<0>
0xf57d350: i32 = add 0xf5822b0, Constant:i32<1>
0xf5822b0: i32,ch = CopyFromReg 0xf314c40, Register:i32 %vreg2
0xf57dbc0: i32 = Register %vreg2
0xf57d170: i32 = Constant<1>
In function: __OpenCL_JumpKernel_kernel
The strange thing is, this happens only when targeting some GPUs (i can reproduce it with the Radeon RX480). When targeting the CPU or some older Radeon card (HD 6870) everything seems to work fine and the code executes correctly.
Am i doing something wrong? (Maybe ignoring some device constraint?) Or is this is indeed a bug?
The driver version in question is 18.2.1 (with a OpenCl version of 23.20.15017.3010).
Hi, pangea, which OS you use ?
Windows 10 x64, i can reproduce crash:
clBuildProgram:
LLVM ERROR: Cannot select: 0x9b4c3f0: i64,i64 = shl_parts Constant:i64<1>, Constant:i64<0>, 0x9b4c630
0x9b4c240: i64 = Constant<1>
0x9b4c048: i64 = Constant<0>
0x9b4c630: i32 = add 0x9b4c9d8, Constant:i32<1>
0x9b4c9d8: i32,ch = CopyFromReg 0x9ab2ea8, Register:i32 %vreg2
0x9b4caf8: i32 = Register %vreg2
0x9b4c120: i32 = Constant<1>
In function: __OpenCL_JumpKernel_kernel
Some OpenCL Info:
OpenCL Version OpenCL C 1.2
OpenCL Device Name Bristol Ridge
OpenCL Device Vendor Advanced Micro Devices, Inc.
OpenCL Driver Version 2527.8
OpenCL Device Version OpenCL 1.2 AMD-APP (2527.8)
OpenCL Device Profile FULL_PROFILE
I am also using Wndows 10 x64.
Thanks for reporting the issue. I also observed the same error while testing with CodeXL. I'll open a ticket against it.
[Update]: The kernel seems to work fine on SI and older cards, but fails on CI+ card.
Update:
The issue has been fixed in the latest internal build and the fix will be publicly available soon.