source: icGREP/icgrep-devel/llvm-3.8.0.src/test/Assembler/getelementptr_vec_idx2.ll @ 5027

Last change on this file since 5027 was 5027, checked in by cameron, 3 years ago

Upgrade to llvm 3.8

File size: 696 bytes
Line 
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
7define <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
13define <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
20define <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
Note: See TracBrowser for help on using the repository browser.