diff options
author | Eli Friedman <eli.friedman@gmail.com> | 2009-06-06 19:09:26 +0000 |
---|---|---|
committer | Eli Friedman <eli.friedman@gmail.com> | 2009-06-06 19:09:26 +0000 |
commit | 61d004a12eba93df9d393c80a6836d20bc0b1be5 (patch) | |
tree | e1b6aa263973dbbdf9a37ef7f0603604b890dd5d /test/CodeGen/vector.c | |
parent | dc5a1bdd4c9290eb36e32c20729751c3c47ca61d (diff) |
PR4339: make sure to properly extend/trunc the index of a vector element
insert/extract; the relevant instructions are defined to take only an
i32.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73005 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/CodeGen/vector.c')
-rw-r--r-- | test/CodeGen/vector.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/test/CodeGen/vector.c b/test/CodeGen/vector.c index 2e753b42c4..1084f6d20b 100644 --- a/test/CodeGen/vector.c +++ b/test/CodeGen/vector.c @@ -11,3 +11,11 @@ __v4hi y = {1,2,3,4}; typedef int vty __attribute((vector_size(16))); int a() { vty b; return b[2LL]; } + +// PR4339 +typedef float vec4 __attribute__((vector_size(16))); + +void vac ( vec4* a, char b, float c ) +{ + (*a)[b] = c; +} |