1 ; RUN: not llvm-as < %s >/dev/null 2> %t
2 ; RUN: FileCheck %s < %t
3 ; Test that a vector pointer may be used with a scalar index.
4 ; Test that a vector pointer and vector index should have the same vector width
7 define <2 x i32*> @test2(<2 x i32*> %a) {
8 %w = getelementptr i32, <2 x i32*> %a, i32 2
12 ; This code is correct
13 define <2 x i32*> @test3(i32* %a) {
14 %w = getelementptr i32, i32* %a, <2 x i32> <i32 2, i32 2>
18 ; CHECK: getelementptr vector index has a wrong number of elements
20 define <2 x i32> @test1(<2 x i32*> %a) {
21 %w = getelementptr i32, <2 x i32*> %a, <4 x i32><i32 2, i32 2, i32 2, i32 2>