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 ptr> @test2(<2 x ptr> %a) {
8 %w = getelementptr i32, <2 x ptr> %a, i32 2
12 ; This code is correct
13 define <2 x ptr> @test3(ptr %a) {
14 %w = getelementptr i32, ptr %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 ptr> %a) {
21 %w = getelementptr i32, <2 x ptr> %a, <4 x i32><i32 2, i32 2, i32 2, i32 2>