mirror of
https://github.com/RPCS3/llvm.git
synced 2024-12-22 12:08:33 +00:00
2333e29be4
Previously in a vector of pointers, the pointer couldn't be any pointer type, it had to be a pointer to an integer or floating point type. This is a hassle for dragonegg because the GCC vectorizer happily produces vectors of pointers where the pointer is a pointer to a struct or whatever. Vector getelementptr was restricted to just one index, but now that vectors of pointers can have any pointer type it is more natural to allow arbitrary vector getelementptrs. There is however the issue of struct GEPs, where if each lane chose different struct fields then from that point on each lane will be working down into unrelated types. This seems like too much pain for too little gain, so when you have a vector struct index all the elements are required to be the same. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@167828 91177308-0d34-0410-b5e6-96231b3b80d8
11 lines
304 B
LLVM
11 lines
304 B
LLVM
; RUN: not llvm-as < %s >/dev/null 2> %t
|
|
; RUN: FileCheck %s < %t
|
|
; Test that vector indices have the same number of elements as the pointer.
|
|
|
|
; CHECK: getelementptr index type missmatch
|
|
|
|
define <4 x i32> @test(<4 x i32>* %a) {
|
|
%w = getelementptr <4 x i32>* %a, <2 x i32> <i32 5, i32 9>
|
|
ret i32 %w
|
|
}
|