- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello,
On this kernel OpenCL compiler gives the error.
[cpp]
#define bswap32(x) ( ((x) << 24) | (((x) << 8) & 0x00ff0000) | (((x) >> 8) & 0x0000ff00) | ((x) >> 24) )
__kernel void buggy(const uint input, __global uint * output)
{
output[0] = swap(input);
}
[/cpp]
Error is:
fcl build 1 succeeded.error: Cannot select: 0x2d4e258: i32 = bswap 0x2d4e0c0 [ORD=1] [ID=6]
0x2d4e0c0: i32,ch = CopyFromReg 0x2d61944, 0x2d4e038 [ORD=1] [ID=4]
0x2d4e038: i32 = Register %vreg0 [ORD=1] [ID=1]
error: midlevel compiler failed build.
Build failed!
If I change swap definition to anything else, like,
[cpp]
#define bswap32(a) (as_uint(as_uchar4(a).wzyx))
[/cpp]
everything is ok.
It's interesting that NVIDIA had the same bug:
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I am able to reproduce the issue. Thanks for posting the kernel. Will get back to you with more findings.
Raghu
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
It seems to be fixed in 9.18.10.3257 driver. Thanks.
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page