diff options
author | Eli Friedman <eli.friedman@gmail.com> | 2011-12-22 03:51:45 +0000 |
---|---|---|
committer | Eli Friedman <eli.friedman@gmail.com> | 2011-12-22 03:51:45 +0000 |
commit | 803acb3ff2bb1fe322b530d3bf2db73a5c3eb305 (patch) | |
tree | eb3cf1f86bfe88e9fee5b287d80d3d7e547a2368 /clang/test/CodeGen/const-init.c | |
parent | 29abd977de5a497134f82ffa799541b62dc872cd (diff) | |
download | bcm5719-llvm-803acb3ff2bb1fe322b530d3bf2db73a5c3eb305.tar.gz bcm5719-llvm-803acb3ff2bb1fe322b530d3bf2db73a5c3eb305.zip |
Add support for bitcasts to vector type in Evaluate.
llvm-svn: 147137
Diffstat (limited to 'clang/test/CodeGen/const-init.c')
-rw-r--r-- | clang/test/CodeGen/const-init.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/clang/test/CodeGen/const-init.c b/clang/test/CodeGen/const-init.c index 9bc3bbafdef..4f3f7ab5533 100644 --- a/clang/test/CodeGen/const-init.c +++ b/clang/test/CodeGen/const-init.c @@ -132,3 +132,15 @@ int g25() { void g27() { // PR8073 static void *x = &x; } + +void g28() { + typedef long long v1i64 __attribute((vector_size(8))); + typedef short v12i16 __attribute((vector_size(24))); + typedef long double v2f80 __attribute((vector_size(24))); + // CHECK: @g28.a = internal global <1 x i64> <i64 10> + // CHECK: @g28.b = internal global <12 x i16> <i16 0, i16 0, i16 0, i16 -32768, i16 16383, i16 0, i16 0, i16 0, i16 0, i16 -32768, i16 16384, i16 0> + // CHECK: @g28.c = internal global <2 x x86_fp80> <x86_fp80 0xK3FFF8000000000000000, x86_fp80 0xK40008000000000000000>, align 32 + static v1i64 a = (v1i64)10LL; + static v12i16 b = (v2f80){1,2}; + static v2f80 c = (v12i16){0,0,0,-32768,16383,0,0,0,0,-32768,16384,0}; +} |