diff options
Diffstat (limited to 'test/Feature')
-rw-r--r-- | test/Feature/alias2.ll | 19 | ||||
-rw-r--r-- | test/Feature/aliases.ll | 4 | ||||
-rw-r--r-- | test/Feature/instructions.ll | 2 |
3 files changed, 22 insertions, 3 deletions
diff --git a/test/Feature/alias2.ll b/test/Feature/alias2.ll new file mode 100644 index 0000000..693ef7c --- /dev/null +++ b/test/Feature/alias2.ll @@ -0,0 +1,19 @@ +; RUN: llvm-as < %s | llvm-dis | FileCheck %s + +@v1 = global i32 0 +; CHECK: @v1 = global i32 0 + +@v2 = global [1 x i32] zeroinitializer +; CHECK: @v2 = global [1 x i32] zeroinitializer + +@v3 = alias i16, i32* @v1 +; CHECK: @v3 = alias i16, i32* @v1 + +@v4 = alias i32, [1 x i32]* @v2 +; CHECK: @v4 = alias i32, [1 x i32]* @v2 + +@v5 = alias addrspace(2) i32, i32* @v1 +; CHECK: @v5 = alias addrspace(2) i32, i32* @v1 + +@v6 = alias i16, i32* @v1 +; CHECK: @v6 = alias i16, i32* @v1 diff --git a/test/Feature/aliases.ll b/test/Feature/aliases.ll index 7fe9d0b..b2ce82a 100644 --- a/test/Feature/aliases.ll +++ b/test/Feature/aliases.ll @@ -7,7 +7,6 @@ @bar = global i32 0 @foo1 = alias i32* @bar @foo2 = alias i32* @bar -@foo3 = alias i32* @foo2 %FunTy = type i32() @@ -15,11 +14,10 @@ define i32 @foo_f() { ret i32 0 } @bar_f = alias weak_odr %FunTy* @foo_f -@bar_ff = alias i32()* @bar_f @bar_i = alias internal i32* @bar -@A = alias bitcast (i32* @bar to i64*) +@A = alias i64, i32* @bar define i32 @test() { entry: diff --git a/test/Feature/instructions.ll b/test/Feature/instructions.ll index d0c303d..aa96294 100644 --- a/test/Feature/instructions.ll +++ b/test/Feature/instructions.ll @@ -4,11 +4,13 @@ define i32 @test_extractelement(<4 x i32> %V) { %R = extractelement <4 x i32> %V, i32 1 ; <i32> [#uses=1] + %S = extractelement <4 x i32> %V, i64 1 ; <i32> [#uses=0] ret i32 %R } define <4 x i32> @test_insertelement(<4 x i32> %V) { %R = insertelement <4 x i32> %V, i32 0, i32 0 ; <<4 x i32>> [#uses=1] + %S = insertelement <4 x i32> %V, i32 0, i64 0 ; <<4 x i32>> [#uses=0] ret <4 x i32> %R } |