[LLVMbugs] [Bug 15977] New: illegal results with a vector select case
bugzilla-daemon at llvm.org
bugzilla-daemon at llvm.org
Mon May 13 04:06:14 PDT 2013
http://llvm.org/bugs/show_bug.cgi?id=15977
Bug ID: 15977
Summary: illegal results with a vector select case
Product: libraries
Version: trunk
Hardware: PC
OS: Linux
Status: NEW
Severity: normal
Priority: P
Component: Backend: X86
Assignee: unassignedbugs at nondot.org
Reporter: pekka.jaaskelainen at tut.fi
CC: llvmbugs at cs.uiuc.edu
Classification: Unclassified
Created attachment 10500
--> http://llvm.org/bugs/attachment.cgi?id=10500&action=edit
the kernel LLVM assembly
This is a strange flaky bug that seems like a code gen issue because the .ll
seems fine to me. Also, it passes with LLVM 3.2.
~/local/stow/llvm-3.3/bin/clang main.c -O3 parallel.ll -o foo && ./foo
max(a,b)[0] type=uint2 a=0x15b348c9 b=0xf88e7d07 want=0xf88e7d07 got=15b348c9
min(a,b)[0] type=uint2 a=0x15b348c9 b=0xf88e7d07 want=0x15b348c9 got=f88e7d07
~/local/stow/llvm-3.2/bin/clang main.c -O3 parallel.ll -o foo && ./foo
OK
~/local/stow/llvm-3.3/bin/clang main.c -O0 parallel.ll -o foo && ./foo
max(a,b)[0] type=uint2 a=0x15b348c9 b=0xf88e7d07 want=0xf88e7d07 got=15b348c9
min(a,b)[0] type=uint2 a=0x15b348c9 b=0xf88e7d07 want=0x15b348c9 got=f88e7d07
The code originates from a simple OpenCL C kernel:
kernel
void test_min_max() {
volatile uint2 a = (uint2)(0x15b348c9, 0x15b348c9);
volatile uint2 b = (uint2)(0xf88e7d07, 0xf88e7d07);
uint2 max_ = max(a, b);
uint2 min_ = min(a, b);
printf("max(a,b)[0] type=uint2 a=0x15b348c9 b=0xf88e7d07 want=0xf88e7d07
got=%x\n", max_[0]);
printf("min(a,b)[0] type=uint2 a=0x15b348c9 b=0xf88e7d07 want=0x15b348c9
got=%x\n", min_[0]);
}
I just modified it to remove unneeded args and added a C main to call it. I
also removed the LLVM 3.3's attribute markers to make it compile with LLVM 3.2.
Original pocl bug report:
https://bugs.launchpad.net/pocl/+bug/1179211
--
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20130513/0e73880e/attachment.html>
More information about the llvm-bugs
mailing list