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 5 6 ; This code is correct 7 define <2 x i32*> @test2(<2 x i32*> %a) { 8 %w = getelementptr i32, <2 x i32*> %a, i32 2 9 ret <2 x i32*> %w 10 } 11 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> 15 ret <2 x i32*> %w 16 } 17 18 ; CHECK: getelementptr vector index has a wrong number of elements 19 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> 22 ret <2 x i32> %w 23 } 24 25