diff options
author | Chris Lattner <sabre@nondot.org> | 2009-12-23 21:31:11 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2009-12-23 21:31:11 +0000 |
commit | 4e1a323b85d5b0807e715ff3c2dd3c6e434975e8 (patch) | |
tree | bc4592f72bc94e8ef1556e7aec188da530354743 /clang/test/CodeGen/ext-vector.c | |
parent | 43c8be526dd5459527345c4fd1e77b8faa85a02e (diff) | |
download | bcm5719-llvm-4e1a323b85d5b0807e715ff3c2dd3c6e434975e8.tar.gz bcm5719-llvm-4e1a323b85d5b0807e715ff3c2dd3c6e434975e8.zip |
fix opencl extvector element extraction on rvalues. We previously
error_unsupported on test10 and crashed on test11.
llvm-svn: 92056
Diffstat (limited to 'clang/test/CodeGen/ext-vector.c')
-rw-r--r-- | clang/test/CodeGen/ext-vector.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/clang/test/CodeGen/ext-vector.c b/clang/test/CodeGen/ext-vector.c index e322f77bdea..d09599dfb6c 100644 --- a/clang/test/CodeGen/ext-vector.c +++ b/clang/test/CodeGen/ext-vector.c @@ -138,3 +138,16 @@ void test8(float4 *ap, float4 *bp, int c) { cmp = a == b; cmp = a != b; } + +int test9(int4 V) { + return V.xy.x; +} + +int test10(foo_t V) { + return (V+V).x; +} + +int4 test11a(); +int test11() { + return test11a().x; +} |