http://llvm.org/bugs/show_bug.cgi?id=20697
Bug ID: 20697
Summary: Is OpenCL indexing supposed to work on a 'hi'/'lo'
vector components?
Product: clang
Version: trunk
Hardware: Macintosh
OS: All
Status: NEW
Severity: normal
Priority: P
Component: Frontend
Assignee: [email protected]
Reporter: [email protected]
CC: [email protected]
Classification: Unclassified
Currently, clang asserts in IRGen on the following code (and if assert is off
it
produces unexpected result).
#include <stdio.h>
int main()
{
typedef __attribute__ ((ext_vector_type( 4),__aligned__( 32))) double
double4;
double4 va;
va.lo[0] = 1.0;
va.lo[1] = 2.0;
va.hi[0] = 3.0;
va.hi[1] = 4.0;
printf("%g, %g, %g, %g\n", va[0], va[1], va[2], va[3]);
return 0;
}
// Answer expected to be: 1,2,3,4 instead of 3, 4, 0, 0
Is this expected to work. Documentation is unclear. It does work on the
vector itself:
va[0] = 1.0;
--
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
LLVMbugs mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/llvmbugs