aboutsummaryrefslogtreecommitdiffstats
path: root/test/Transforms/DeadStoreElimination/simple.ll
diff options
context:
space:
mode:
authorPirama Arumuga Nainar <pirama@google.com>2015-04-10 21:22:52 +0000
committerGerrit Code Review <noreply-gerritcodereview@google.com>2015-04-10 21:23:04 +0000
commit31195f0bdca6ee2a5e72d07edf13e1d81206d949 (patch)
tree1b2c9792582e12f5af0b1512e3094425f0dc0df9 /test/Transforms/DeadStoreElimination/simple.ll
parentc75239e6119d0f9a74c57099d91cbc9bde56bf33 (diff)
parent4c5e43da7792f75567b693105cc53e3f1992ad98 (diff)
downloadexternal_llvm-31195f0bdca6ee2a5e72d07edf13e1d81206d949.zip
external_llvm-31195f0bdca6ee2a5e72d07edf13e1d81206d949.tar.gz
external_llvm-31195f0bdca6ee2a5e72d07edf13e1d81206d949.tar.bz2
Merge "Update aosp/master llvm for rebase to r233350"
Diffstat (limited to 'test/Transforms/DeadStoreElimination/simple.ll')
-rw-r--r--test/Transforms/DeadStoreElimination/simple.ll52
1 files changed, 26 insertions, 26 deletions
diff --git a/test/Transforms/DeadStoreElimination/simple.ll b/test/Transforms/DeadStoreElimination/simple.ll
index 1e81385..dd1443e 100644
--- a/test/Transforms/DeadStoreElimination/simple.ll
+++ b/test/Transforms/DeadStoreElimination/simple.ll
@@ -6,7 +6,7 @@ declare void @llvm.memcpy.p0i8.p0i8.i64(i8* nocapture, i8* nocapture, i64, i32,
declare i8* @llvm.init.trampoline(i8*, i8*, i8*)
define void @test1(i32* %Q, i32* %P) {
- %DEAD = load i32* %Q
+ %DEAD = load i32, i32* %Q
store i32 %DEAD, i32* %P
store i32 0, i32* %P
ret void
@@ -31,17 +31,17 @@ define void @test2(i32 *%p, i32 *%q) {
define i32 @test3(i32* %g_addr) nounwind {
; CHECK-LABEL: @test3(
-; CHECK: load i32* %g_addr
- %g_value = load i32* %g_addr, align 4
+; CHECK: load i32, i32* %g_addr
+ %g_value = load i32, i32* %g_addr, align 4
store i32 -1, i32* @g, align 4
store i32 %g_value, i32* %g_addr, align 4
- %tmp3 = load i32* @g, align 4
+ %tmp3 = load i32, i32* @g, align 4
ret i32 %tmp3
}
define void @test4(i32* %Q) {
- %a = load i32* %Q
+ %a = load i32, i32* %Q
store volatile i32 %a, i32* %Q
ret void
; CHECK-LABEL: @test4(
@@ -51,7 +51,7 @@ define void @test4(i32* %Q) {
}
define void @test5(i32* %Q) {
- %a = load volatile i32* %Q
+ %a = load volatile i32, i32* %Q
store i32 %a, i32* %Q
ret void
; CHECK-LABEL: @test5(
@@ -87,7 +87,7 @@ define i32 @test8() {
store i32 1234567, i32* %V
%V2 = bitcast i32* %V to i8*
store i8 0, i8* %V2
- %X = load i32* %V
+ %X = load i32, i32* %V
ret i32 %X
; CHECK-LABEL: @test8(
@@ -98,7 +98,7 @@ define i32 @test8() {
; Test for byval handling.
%struct.x = type { i32, i32, i32, i32 }
define void @test9(%struct.x* byval %a) nounwind {
- %tmp2 = getelementptr %struct.x* %a, i32 0, i32 0
+ %tmp2 = getelementptr %struct.x, %struct.x* %a, i32 0, i32 0
store i32 1, i32* %tmp2, align 4
ret void
; CHECK-LABEL: @test9(
@@ -107,7 +107,7 @@ define void @test9(%struct.x* byval %a) nounwind {
; Test for inalloca handling.
define void @test9_2(%struct.x* inalloca %a) nounwind {
- %tmp2 = getelementptr %struct.x* %a, i32 0, i32 0
+ %tmp2 = getelementptr %struct.x, %struct.x* %a, i32 0, i32 0
store i32 1, i32* %tmp2, align 4
ret void
; CHECK-LABEL: @test9_2(
@@ -131,7 +131,7 @@ define void @test11() {
; CHECK-LABEL: @test11(
%storage = alloca [10 x i8], align 16 ; <[10 x i8]*> [#uses=1]
; CHECK-NOT: alloca
- %cast = getelementptr [10 x i8]* %storage, i32 0, i32 0 ; <i8*> [#uses=1]
+ %cast = getelementptr [10 x i8], [10 x i8]* %storage, i32 0, i32 0 ; <i8*> [#uses=1]
%tramp = call i8* @llvm.init.trampoline( i8* %cast, i8* bitcast (void ()* @test11f to i8*), i8* null ) ; <i8*> [#uses=1]
; CHECK-NOT: trampoline
ret void
@@ -141,10 +141,10 @@ define void @test11() {
; PR2599 - load -> store to same address.
define void @test12({ i32, i32 }* %x) nounwind {
- %tmp4 = getelementptr { i32, i32 }* %x, i32 0, i32 0
- %tmp5 = load i32* %tmp4, align 4
- %tmp7 = getelementptr { i32, i32 }* %x, i32 0, i32 1
- %tmp8 = load i32* %tmp7, align 4
+ %tmp4 = getelementptr { i32, i32 }, { i32, i32 }* %x, i32 0, i32 0
+ %tmp5 = load i32, i32* %tmp4, align 4
+ %tmp7 = getelementptr { i32, i32 }, { i32, i32 }* %x, i32 0, i32 1
+ %tmp8 = load i32, i32* %tmp7, align 4
%tmp17 = sub i32 0, %tmp8
store i32 %tmp5, i32* %tmp4, align 4
store i32 %tmp17, i32* %tmp7, align 4
@@ -160,7 +160,7 @@ declare void @test13f()
define i32* @test13() {
%p = tail call i8* @malloc(i32 4)
%P = bitcast i8* %p to i32*
- %DEAD = load i32* %P
+ %DEAD = load i32, i32* %P
%DEAD2 = add i32 %DEAD, 1
store i32 %DEAD2, i32* %P
call void @test13f( )
@@ -176,7 +176,7 @@ define i32 addrspace(1)* @test13_addrspacecast() {
%p = tail call i8* @malloc(i32 4)
%p.bc = bitcast i8* %p to i32*
%P = addrspacecast i32* %p.bc to i32 addrspace(1)*
- %DEAD = load i32 addrspace(1)* %P
+ %DEAD = load i32, i32 addrspace(1)* %P
%DEAD2 = add i32 %DEAD, 1
store i32 %DEAD2, i32 addrspace(1)* %P
call void @test13f( )
@@ -195,7 +195,7 @@ declare noalias i8* @calloc(i32, i32)
define void @test14(i32* %Q) {
%P = alloca i32
- %DEAD = load i32* %Q
+ %DEAD = load i32, i32* %Q
store i32 %DEAD, i32* %P
ret void
@@ -267,7 +267,7 @@ declare void @test19f({i32}* byval align 4 %P)
define void @test19({i32} * nocapture byval align 4 %arg5) nounwind ssp {
bb:
- %tmp7 = getelementptr inbounds {i32}* %arg5, i32 0, i32 0
+ %tmp7 = getelementptr inbounds {i32}, {i32}* %arg5, i32 0, i32 0
store i32 912, i32* %tmp7
call void @test19f({i32}* byval align 4 %arg5)
ret void
@@ -310,9 +310,9 @@ define void @test22(i1 %i, i32 %k, i32 %m) nounwind {
declare noalias i8* @strdup(i8* nocapture) nounwind
define noalias i8* @test23() nounwind uwtable ssp {
%x = alloca [2 x i8], align 1
- %arrayidx = getelementptr inbounds [2 x i8]* %x, i64 0, i64 0
+ %arrayidx = getelementptr inbounds [2 x i8], [2 x i8]* %x, i64 0, i64 0
store i8 97, i8* %arrayidx, align 1
- %arrayidx1 = getelementptr inbounds [2 x i8]* %x, i64 0, i64 1
+ %arrayidx1 = getelementptr inbounds [2 x i8], [2 x i8]* %x, i64 0, i64 1
store i8 0, i8* %arrayidx1, align 1
%call = call i8* @strdup(i8* %arrayidx) nounwind
ret i8* %call
@@ -326,13 +326,13 @@ define noalias i8* @test23() nounwind uwtable ssp {
; CHECK: store i32 %c
; CHECK: ret void
define void @test24([2 x i32]* %a, i32 %b, i32 %c) nounwind {
- %1 = getelementptr inbounds [2 x i32]* %a, i64 0, i64 0
+ %1 = getelementptr inbounds [2 x i32], [2 x i32]* %a, i64 0, i64 0
store i32 0, i32* %1, align 4
- %2 = getelementptr inbounds [2 x i32]* %a, i64 0, i64 1
+ %2 = getelementptr inbounds [2 x i32], [2 x i32]* %a, i64 0, i64 1
store i32 0, i32* %2, align 4
- %3 = getelementptr inbounds [2 x i32]* %a, i64 0, i64 0
+ %3 = getelementptr inbounds [2 x i32], [2 x i32]* %a, i64 0, i64 0
store i32 %b, i32* %3, align 4
- %4 = getelementptr inbounds [2 x i32]* %a, i64 0, i64 1
+ %4 = getelementptr inbounds [2 x i32], [2 x i32]* %a, i64 0, i64 1
store i32 %c, i32* %4, align 4
ret void
}
@@ -343,8 +343,8 @@ define void @test24([2 x i32]* %a, i32 %b, i32 %c) nounwind {
; CHECK: store i8 0
; CHECK: store i8 %tmp
define i8* @test25(i8* %p) nounwind {
- %p.4 = getelementptr i8* %p, i64 4
- %tmp = load i8* %p.4, align 1
+ %p.4 = getelementptr i8, i8* %p, i64 4
+ %tmp = load i8, i8* %p.4, align 1
store i8 0, i8* %p.4, align 1
%q = call i8* @strdup(i8* %p) nounwind optsize
store i8 %tmp, i8* %p.4, align 1