summaryrefslogtreecommitdiff
path: root/test/Transforms/DeadStoreElimination
diff options
context:
space:
mode:
authorStephen Lin <stephenwlin@gmail.com>2013-07-14 01:42:54 +0000
committerStephen Lin <stephenwlin@gmail.com>2013-07-14 01:42:54 +0000
commit39f4e8d9cce22b60a3417a5f17c847fa5b1daebf (patch)
tree7fed202a2c2c7866f60344b6388e0d3bd98cb14c /test/Transforms/DeadStoreElimination
parent82e539d037a33f968e4a5476d3d471e1112f8ab2 (diff)
downloadllvm-39f4e8d9cce22b60a3417a5f17c847fa5b1daebf.tar.gz
llvm-39f4e8d9cce22b60a3417a5f17c847fa5b1daebf.tar.bz2
llvm-39f4e8d9cce22b60a3417a5f17c847fa5b1daebf.tar.xz
Update Transforms tests to use CHECK-LABEL for easier debugging. No functionality change.
This update was done with the following bash script: find test/Transforms -name "*.ll" | \ while read NAME; do echo "$NAME" if ! grep -q "^; *RUN: *llc" $NAME; then TEMP=`mktemp -t temp` cp $NAME $TEMP sed -n "s/^define [^@]*@\([A-Za-z0-9_]*\)(.*$/\1/p" < $NAME | \ while read FUNC; do sed -i '' "s/;\(.*\)\([A-Za-z0-9_]*\):\( *\)@$FUNC\([( ]*\)\$/;\1\2-LABEL:\3@$FUNC(/g" $TEMP done mv $TEMP $NAME fi done git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@186268 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/Transforms/DeadStoreElimination')
-rw-r--r--test/Transforms/DeadStoreElimination/2011-09-06-EndOfFunction.ll2
-rw-r--r--test/Transforms/DeadStoreElimination/OverwriteStoreEnd.ll14
-rw-r--r--test/Transforms/DeadStoreElimination/PartialStore.ll10
-rw-r--r--test/Transforms/DeadStoreElimination/free.ll10
-rw-r--r--test/Transforms/DeadStoreElimination/libcalls.ll12
-rw-r--r--test/Transforms/DeadStoreElimination/lifetime.ll2
-rw-r--r--test/Transforms/DeadStoreElimination/memintrinsics.ll6
-rw-r--r--test/Transforms/DeadStoreElimination/simple.ll50
8 files changed, 53 insertions, 53 deletions
diff --git a/test/Transforms/DeadStoreElimination/2011-09-06-EndOfFunction.ll b/test/Transforms/DeadStoreElimination/2011-09-06-EndOfFunction.ll
index d114e513ed..95253f6570 100644
--- a/test/Transforms/DeadStoreElimination/2011-09-06-EndOfFunction.ll
+++ b/test/Transforms/DeadStoreElimination/2011-09-06-EndOfFunction.ll
@@ -5,7 +5,7 @@ target triple = "x86_64-apple-darwin"
%"class.std::auto_ptr" = type { i32* }
-; CHECK: @_Z3foov
+; CHECK-LABEL: @_Z3foov(
define void @_Z3foov(%"class.std::auto_ptr"* noalias nocapture sret %agg.result) uwtable ssp {
_ZNSt8auto_ptrIiED1Ev.exit:
%temp.lvalue = alloca %"class.std::auto_ptr", align 8
diff --git a/test/Transforms/DeadStoreElimination/OverwriteStoreEnd.ll b/test/Transforms/DeadStoreElimination/OverwriteStoreEnd.ll
index ed53eb524c..968d608c67 100644
--- a/test/Transforms/DeadStoreElimination/OverwriteStoreEnd.ll
+++ b/test/Transforms/DeadStoreElimination/OverwriteStoreEnd.ll
@@ -8,7 +8,7 @@ target datalayout = "e-p:64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f3
@glob2 = global %struct.vec2plusi zeroinitializer, align 16
define void @write24to28(i32* nocapture %p) nounwind uwtable ssp {
-; CHECK: @write24to28
+; CHECK-LABEL: @write24to28(
entry:
%arrayidx0 = getelementptr inbounds i32* %p, i64 1
%p3 = bitcast i32* %arrayidx0 to i8*
@@ -20,7 +20,7 @@ entry:
}
define void @write28to32(i32* nocapture %p) nounwind uwtable ssp {
-; CHECK: @write28to32
+; CHECK-LABEL: @write28to32(
entry:
%p3 = bitcast i32* %p to i8*
; CHECK: call void @llvm.memset.p0i8.i64(i8* %p3, i8 0, i64 28, i32 4, i1 false)
@@ -31,7 +31,7 @@ entry:
}
define void @dontwrite28to32memset(i32* nocapture %p) nounwind uwtable ssp {
-; CHECK: @dontwrite28to32memset
+; CHECK-LABEL: @dontwrite28to32memset(
entry:
%p3 = bitcast i32* %p to i8*
; CHECK: call void @llvm.memset.p0i8.i64(i8* %p3, i8 0, i64 32, i32 16, i1 false)
@@ -42,7 +42,7 @@ entry:
}
define void @write32to36(%struct.vec2plusi* nocapture %p) nounwind uwtable ssp {
-; CHECK: @write32to36
+; CHECK-LABEL: @write32to36(
entry:
%0 = bitcast %struct.vec2plusi* %p to i8*
; CHECK: tail call void @llvm.memcpy.p0i8.p0i8.i64(i8* %0, i8* bitcast (%struct.vec2plusi* @glob2 to i8*), i64 32, i32 16, i1 false)
@@ -53,7 +53,7 @@ entry:
}
define void @write16to32(%struct.vec2* nocapture %p) nounwind uwtable ssp {
-; CHECK: @write16to32
+; CHECK-LABEL: @write16to32(
entry:
%0 = bitcast %struct.vec2* %p to i8*
; CHECK: tail call void @llvm.memcpy.p0i8.p0i8.i64(i8* %0, i8* bitcast (%struct.vec2* @glob1 to i8*), i64 16, i32 16, i1 false)
@@ -64,7 +64,7 @@ entry:
}
define void @dontwrite28to32memcpy(%struct.vec2* nocapture %p) nounwind uwtable ssp {
-; CHECK: @dontwrite28to32memcpy
+; CHECK-LABEL: @dontwrite28to32memcpy(
entry:
%0 = bitcast %struct.vec2* %p to i8*
; CHECK: tail call void @llvm.memcpy.p0i8.p0i8.i64(i8* %0, i8* bitcast (%struct.vec2* @glob1 to i8*), i64 32, i32 16, i1 false)
@@ -80,7 +80,7 @@ declare void @llvm.memset.p0i8.i64(i8* nocapture, i8, i64, i32, i1) nounwind
%struct.trapframe = type { i64, i64, i64 }
; bugzilla 11455 - make sure negative GEP's don't break this optimisation
-; CHECK: @cpu_lwp_fork
+; CHECK-LABEL: @cpu_lwp_fork(
define void @cpu_lwp_fork(%struct.trapframe* %md_regs, i64 %pcb_rsp0) nounwind uwtable noinline ssp {
entry:
%0 = inttoptr i64 %pcb_rsp0 to %struct.trapframe*
diff --git a/test/Transforms/DeadStoreElimination/PartialStore.ll b/test/Transforms/DeadStoreElimination/PartialStore.ll
index 7ac1e0844e..4799ef3383 100644
--- a/test/Transforms/DeadStoreElimination/PartialStore.ll
+++ b/test/Transforms/DeadStoreElimination/PartialStore.ll
@@ -8,13 +8,13 @@ define void @test1(i32 *%V) {
store i8 0, i8* %V2
store i32 1234567, i32* %V
ret void
-; CHECK: @test1
+; CHECK-LABEL: @test1(
; CHECK-NEXT: store i32 1234567
}
; Note that we could do better by merging the two stores into one.
define void @test2(i32* %P) {
-; CHECK: @test2
+; CHECK-LABEL: @test2(
store i32 0, i32* %P
; CHECK: store i32
%Q = bitcast i32* %P to i16*
@@ -25,7 +25,7 @@ define void @test2(i32* %P) {
define i32 @test3(double %__x) {
-; CHECK: @test3
+; CHECK-LABEL: @test3(
; CHECK: store double
%__u = alloca { [3 x i32] }
%tmp.1 = bitcast { [3 x i32] }* %__u to double*
@@ -39,7 +39,7 @@ define i32 @test3(double %__x) {
; PR6043
define void @test4(i8* %P) {
-; CHECK: @test4
+; CHECK-LABEL: @test4(
; CHECK-NEXT: bitcast
; CHECK-NEXT: store double
@@ -64,7 +64,7 @@ define void @test5(i32 %i) nounwind ssp {
call void @test5a(i32* %A)
ret void
-; CHECK: @test5(
+; CHECK-LABEL: @test5(
; CHECK-NEXT: alloca
; CHECK-NEXT: store i32 20
; CHECK-NEXT: call void @test5a
diff --git a/test/Transforms/DeadStoreElimination/free.ll b/test/Transforms/DeadStoreElimination/free.ll
index a5fbdc7638..1d273d67a5 100644
--- a/test/Transforms/DeadStoreElimination/free.ll
+++ b/test/Transforms/DeadStoreElimination/free.ll
@@ -5,7 +5,7 @@ target datalayout = "e-p:64:64:64"
declare void @free(i8* nocapture)
declare noalias i8* @malloc(i64)
-; CHECK: @test
+; CHECK-LABEL: @test(
; CHECK-NEXT: bitcast
; CHECK-NEXT: @free
; CHECK-NEXT: ret void
@@ -17,7 +17,7 @@ define void @test(i32* %Q, i32* %P) {
ret void
}
-; CHECK: @test2
+; CHECK-LABEL: @test2(
; CHECK-NEXT: bitcast
; CHECK-NEXT: @free
; CHECK-NEXT: ret void
@@ -29,7 +29,7 @@ define void @test2({i32, i32}* %P) {
ret void
}
-; CHECK: @test3
+; CHECK-LABEL: @test3(
; CHECK-NOT: store
; CHECK: ret void
define void @test3() {
@@ -42,7 +42,7 @@ define void @test3() {
}
; PR11240
-; CHECK: @test4
+; CHECK-LABEL: @test4(
; CHECK-NOT: store
; CHECK: ret void
define void @test4(i1 %x) nounwind {
@@ -59,7 +59,7 @@ skipinit1:
ret void
}
-; CHECK: @test5
+; CHECK-LABEL: @test5(
define void @test5() {
br label %bb
diff --git a/test/Transforms/DeadStoreElimination/libcalls.ll b/test/Transforms/DeadStoreElimination/libcalls.ll
index 4639c0bc96..65396945bf 100644
--- a/test/Transforms/DeadStoreElimination/libcalls.ll
+++ b/test/Transforms/DeadStoreElimination/libcalls.ll
@@ -2,7 +2,7 @@
declare i8* @strcpy(i8* %dest, i8* %src) nounwind
define void @test1(i8* %src) {
-; CHECK: @test1
+; CHECK-LABEL: @test1(
%B = alloca [16 x i8]
%dest = getelementptr inbounds [16 x i8]* %B, i64 0, i64 0
; CHECK-NOT: @strcpy
@@ -13,7 +13,7 @@ define void @test1(i8* %src) {
declare i8* @strncpy(i8* %dest, i8* %src, i32 %n) nounwind
define void @test2(i8* %src) {
-; CHECK: @test2
+; CHECK-LABEL: @test2(
%B = alloca [16 x i8]
%dest = getelementptr inbounds [16 x i8]* %B, i64 0, i64 0
; CHECK-NOT: @strncpy
@@ -24,7 +24,7 @@ define void @test2(i8* %src) {
declare i8* @strcat(i8* %dest, i8* %src) nounwind
define void @test3(i8* %src) {
-; CHECK: @test3
+; CHECK-LABEL: @test3(
%B = alloca [16 x i8]
%dest = getelementptr inbounds [16 x i8]* %B, i64 0, i64 0
; CHECK-NOT: @strcat
@@ -35,7 +35,7 @@ define void @test3(i8* %src) {
declare i8* @strncat(i8* %dest, i8* %src, i32 %n) nounwind
define void @test4(i8* %src) {
-; CHECK: @test4
+; CHECK-LABEL: @test4(
%B = alloca [16 x i8]
%dest = getelementptr inbounds [16 x i8]* %B, i64 0, i64 0
; CHECK-NOT: @strncat
@@ -45,7 +45,7 @@ define void @test4(i8* %src) {
}
define void @test5(i8* nocapture %src) {
-; CHECK: @test5
+; CHECK-LABEL: @test5(
%dest = alloca [100 x i8], align 16
%arraydecay = getelementptr inbounds [100 x i8]* %dest, i64 0, i64 0
%call = call i8* @strcpy(i8* %arraydecay, i8* %src)
@@ -57,7 +57,7 @@ define void @test5(i8* nocapture %src) {
declare void @user(i8* %p)
define void @test6(i8* %src) {
-; CHECK: @test6
+; CHECK-LABEL: @test6(
%B = alloca [16 x i8]
%dest = getelementptr inbounds [16 x i8]* %B, i64 0, i64 0
; CHECK: @strcpy
diff --git a/test/Transforms/DeadStoreElimination/lifetime.ll b/test/Transforms/DeadStoreElimination/lifetime.ll
index 678565315e..7fe7fbfa74 100644
--- a/test/Transforms/DeadStoreElimination/lifetime.ll
+++ b/test/Transforms/DeadStoreElimination/lifetime.ll
@@ -7,7 +7,7 @@ declare void @llvm.lifetime.end(i64, i8* nocapture) nounwind
declare void @llvm.memset.p0i8.i8(i8* nocapture, i8, i8, i32, i1) nounwind
define void @test1() {
-; CHECK: @test1
+; CHECK-LABEL: @test1(
%A = alloca i8
store i8 0, i8* %A ;; Written to by memset
diff --git a/test/Transforms/DeadStoreElimination/memintrinsics.ll b/test/Transforms/DeadStoreElimination/memintrinsics.ll
index d5c5365771..5bbb8e099c 100644
--- a/test/Transforms/DeadStoreElimination/memintrinsics.ll
+++ b/test/Transforms/DeadStoreElimination/memintrinsics.ll
@@ -5,7 +5,7 @@ declare void @llvm.memmove.p0i8.p0i8.i8(i8* nocapture, i8* nocapture, i8, i32, i
declare void @llvm.memset.p0i8.i8(i8* nocapture, i8, i8, i32, i1) nounwind
define void @test1() {
-; CHECK: @test1
+; CHECK-LABEL: @test1(
%A = alloca i8
%B = alloca i8
@@ -19,7 +19,7 @@ define void @test1() {
}
define void @test2() {
-; CHECK: @test2
+; CHECK-LABEL: @test2(
%A = alloca i8
%B = alloca i8
@@ -33,7 +33,7 @@ define void @test2() {
}
define void @test3() {
-; CHECK: @test3
+; CHECK-LABEL: @test3(
%A = alloca i8
%B = alloca i8
diff --git a/test/Transforms/DeadStoreElimination/simple.ll b/test/Transforms/DeadStoreElimination/simple.ll
index e0eb90af94..ec98466d33 100644
--- a/test/Transforms/DeadStoreElimination/simple.ll
+++ b/test/Transforms/DeadStoreElimination/simple.ll
@@ -10,7 +10,7 @@ define void @test1(i32* %Q, i32* %P) {
store i32 %DEAD, i32* %P
store i32 0, i32* %P
ret void
-; CHECK: @test1
+; CHECK-LABEL: @test1(
; CHECK-NEXT: store i32 0, i32* %P
; CHECK-NEXT: ret void
}
@@ -21,7 +21,7 @@ define void @test2(i32 *%p, i32 *%q) {
store i32 20, i32* %q, align 4
store i32 30, i32* %p, align 4
ret void
-; CHECK: @test2
+; CHECK-LABEL: @test2(
; CHECK-NEXT: store i32 20
}
@@ -30,7 +30,7 @@ define void @test2(i32 *%p, i32 *%q) {
@g = global i32 1
define i32 @test3(i32* %g_addr) nounwind {
-; CHECK: @test3
+; CHECK-LABEL: @test3(
; CHECK: load i32* %g_addr
%g_value = load i32* %g_addr, align 4
store i32 -1, i32* @g, align 4
@@ -44,7 +44,7 @@ define void @test4(i32* %Q) {
%a = load i32* %Q
store volatile i32 %a, i32* %Q
ret void
-; CHECK: @test4
+; CHECK-LABEL: @test4(
; CHECK-NEXT: load i32
; CHECK-NEXT: store volatile
; CHECK-NEXT: ret void
@@ -54,7 +54,7 @@ define void @test5(i32* %Q) {
%a = load volatile i32* %Q
store i32 %a, i32* %Q
ret void
-; CHECK: @test5
+; CHECK-LABEL: @test5(
; CHECK-NEXT: load volatile
; CHECK-NEXT: ret void
}
@@ -66,7 +66,7 @@ define void @test6(i32 *%p, i8 *%q) {
call void @llvm.memset.p0i8.i64(i8* %q, i8 42, i64 900, i32 1, i1 false)
store i32 30, i32* %p, align 4
ret void
-; CHECK: @test6
+; CHECK-LABEL: @test6(
; CHECK-NEXT: call void @llvm.memset
}
@@ -77,7 +77,7 @@ define void @test7(i32 *%p, i8 *%q, i8* noalias %r) {
call void @llvm.memcpy.p0i8.p0i8.i64(i8* %q, i8* %r, i64 900, i32 1, i1 false)
store i32 30, i32* %p, align 4
ret void
-; CHECK: @test7
+; CHECK-LABEL: @test7(
; CHECK-NEXT: call void @llvm.memcpy
}
@@ -90,7 +90,7 @@ define i32 @test8() {
%X = load i32* %V
ret i32 %X
-; CHECK: @test8
+; CHECK-LABEL: @test8(
; CHECK: store i32 1234567
}
@@ -101,7 +101,7 @@ define void @test9(%struct.x* byval %a) nounwind {
%tmp2 = getelementptr %struct.x* %a, i32 0, i32 0
store i32 1, i32* %tmp2, align 4
ret void
-; CHECK: @test9
+; CHECK-LABEL: @test9(
; CHECK-NEXT: ret void
}
@@ -111,7 +111,7 @@ define double @test10(i8* %X) {
store i8* %X, i8** %X_addr
%tmp.0 = va_arg i8** %X_addr, double
ret double %tmp.0
-; CHECK: @test10
+; CHECK-LABEL: @test10(
; CHECK: store
}
@@ -119,7 +119,7 @@ define double @test10(i8* %X) {
; DSE should delete the dead trampoline.
declare void @test11f()
define void @test11() {
-; CHECK: @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]
@@ -140,7 +140,7 @@ define void @test12({ i32, i32 }* %x) nounwind {
store i32 %tmp5, i32* %tmp4, align 4
store i32 %tmp17, i32* %tmp7, align 4
ret void
-; CHECK: @test12
+; CHECK-LABEL: @test12(
; CHECK-NOT: tmp5
; CHECK: ret void
}
@@ -173,7 +173,7 @@ define void @test14(i32* %Q) {
store i32 %DEAD, i32* %P
ret void
-; CHECK: @test14
+; CHECK-LABEL: @test14(
; CHECK-NEXT: ret void
}
@@ -185,7 +185,7 @@ define void @test15(i8* %P, i8* %Q) nounwind ssp {
tail call void @llvm.memcpy.p0i8.p0i8.i64(i8* %P, i8* %Q, i64 12, i32 1, i1 false)
tail call void @llvm.memcpy.p0i8.p0i8.i64(i8* %P, i8* %Q, i64 12, i32 1, i1 false)
ret void
-; CHECK: @test15
+; CHECK-LABEL: @test15(
; CHECK-NEXT: call void @llvm.memcpy
; CHECK-NEXT: ret
}
@@ -195,7 +195,7 @@ define void @test16(i8* %P, i8* %Q) nounwind ssp {
tail call void @llvm.memcpy.p0i8.p0i8.i64(i8* %P, i8* %Q, i64 8, i32 1, i1 false)
tail call void @llvm.memcpy.p0i8.p0i8.i64(i8* %P, i8* %Q, i64 12, i32 1, i1 false)
ret void
-; CHECK: @test16
+; CHECK-LABEL: @test16(
; CHECK-NEXT: call void @llvm.memcpy
; CHECK-NEXT: ret
}
@@ -205,7 +205,7 @@ define void @test17(i8* %P, i8* noalias %Q) nounwind ssp {
tail call void @llvm.memset.p0i8.i64(i8* %P, i8 42, i64 8, i32 1, i1 false)
tail call void @llvm.memcpy.p0i8.p0i8.i64(i8* %P, i8* %Q, i64 12, i32 1, i1 false)
ret void
-; CHECK: @test17
+; CHECK-LABEL: @test17(
; CHECK-NEXT: call void @llvm.memcpy
; CHECK-NEXT: ret
}
@@ -215,7 +215,7 @@ define void @test17v(i8* %P, i8* %Q) nounwind ssp {
tail call void @llvm.memset.p0i8.i64(i8* %P, i8 42, i64 8, i32 1, i1 true)
tail call void @llvm.memcpy.p0i8.p0i8.i64(i8* %P, i8* %Q, i64 12, i32 1, i1 false)
ret void
-; CHECK: @test17v
+; CHECK-LABEL: @test17v(
; CHECK-NEXT: call void @llvm.memset
; CHECK-NEXT: call void @llvm.memcpy
; CHECK-NEXT: ret
@@ -229,7 +229,7 @@ define void @test18(i8* %P, i8* %Q, i8* %R) nounwind ssp {
tail call void @llvm.memcpy.p0i8.p0i8.i64(i8* %P, i8* %Q, i64 12, i32 1, i1 false)
tail call void @llvm.memcpy.p0i8.p0i8.i64(i8* %P, i8* %R, i64 12, i32 1, i1 false)
ret void
-; CHECK: @test18
+; CHECK-LABEL: @test18(
; CHECK-NEXT: call void @llvm.memcpy
; CHECK-NEXT: call void @llvm.memcpy
; CHECK-NEXT: ret
@@ -246,7 +246,7 @@ bb:
call void @test19f({i32}* byval align 4 %arg5)
ret void
-; CHECK: @test19(
+; CHECK-LABEL: @test19(
; CHECK: store i32 912
; CHECK: call void @test19f
}
@@ -256,10 +256,10 @@ define void @test20() {
store i8 0, i8* %m
ret void
}
-; CHECK: @test20
+; CHECK-LABEL: @test20(
; CHECK-NEXT: ret void
-; CHECK: @test21
+; CHECK-LABEL: @test21(
define void @test21() {
%m = call i8* @calloc(i32 9, i32 7)
store i8 0, i8* %m
@@ -267,7 +267,7 @@ define void @test21() {
ret void
}
-; CHECK: @test22(
+; CHECK-LABEL: @test22(
define void @test22(i1 %i, i32 %k, i32 %m) nounwind {
%k.addr = alloca i32
%m.addr = alloca i32
@@ -278,7 +278,7 @@ define void @test22(i1 %i, i32 %k, i32 %m) nounwind {
}
; PR13547
-; CHECK: @test23
+; CHECK-LABEL: @test23(
; CHECK: store i8 97
; CHECK: store i8 0
declare noalias i8* @strdup(i8* nocapture) nounwind
@@ -293,7 +293,7 @@ define noalias i8* @test23() nounwind uwtable ssp {
}
; Make sure same sized store to later element is deleted
-; CHECK: @test24
+; CHECK-LABEL: @test24(
; CHECK-NOT: store i32 0
; CHECK-NOT: store i32 0
; CHECK: store i32 %b
@@ -312,7 +312,7 @@ define void @test24([2 x i32]* %a, i32 %b, i32 %c) nounwind {
}
; Check another case like PR13547 where strdup is not like malloc.
-; CHECK: @test25
+; CHECK-LABEL: @test25(
; CHECK: load i8
; CHECK: store i8 0
; CHECK: store i8 %tmp