Catch more CHECK that can be converted to CHECK-LABEL in Transforms for easier debugging. No functionality change.
This conversion 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_]*\):\( *\)define\([^@]*\)@$FUNC\([( ]*\)\$/;\1\2-LABEL:\3define\4@$FUNC(/g" $TEMP
done
mv $TEMP $NAME
fi
done
llvm-svn: 186269
diff --git a/llvm/test/Transforms/SCCP/atomic-load-store.ll b/llvm/test/Transforms/SCCP/atomic-load-store.ll
index 09061f0..53e4c10 100644
--- a/llvm/test/Transforms/SCCP/atomic-load-store.ll
+++ b/llvm/test/Transforms/SCCP/atomic-load-store.ll
@@ -16,7 +16,7 @@
store atomic i32 123, i32* @G seq_cst, align 4
ret i32 0
}
-; CHECK: define i32 @test1
+; CHECK-LABEL: define i32 @test1(
; CHECK-NOT: store
; CHECK: ret i32 17
@@ -25,6 +25,6 @@
ret i32 %V
}
-; CHECK: define i32 @test2
+; CHECK-LABEL: define i32 @test2(
; CHECK-NOT: load
; CHECK: ret i32 222
diff --git a/llvm/test/Transforms/SCCP/ipsccp-basic.ll b/llvm/test/Transforms/SCCP/ipsccp-basic.ll
index 7e05ce4..c1c6c92 100644
--- a/llvm/test/Transforms/SCCP/ipsccp-basic.ll
+++ b/llvm/test/Transforms/SCCP/ipsccp-basic.ll
@@ -6,14 +6,14 @@
%X = add i32 1, 2
ret i32 %A
}
-; CHECK: define internal i32 @test1a
+; CHECK-LABEL: define internal i32 @test1a(
; CHECK: ret i32 undef
define i32 @test1b() {
%X = call i32 @test1a( i32 17 )
ret i32 %X
-; CHECK: define i32 @test1b
+; CHECK-LABEL: define i32 @test1b(
; CHECK: ret i32 17
}
@@ -31,7 +31,7 @@
%C.upgrd.1 = call i32 @test2a(i32 1)
ret i32 %C.upgrd.1
}
-; CHECK: define internal i32 @test2a
+; CHECK-LABEL: define internal i32 @test2a(
; CHECK-NEXT: br label %T
; CHECK: ret i32 undef
@@ -40,7 +40,7 @@
%X = call i32 @test2a(i32 0)
ret i32 %X
}
-; CHECK: define i32 @test2b
+; CHECK-LABEL: define i32 @test2b(
; CHECK-NEXT: %X = call i32 @test2a(i32 0)
; CHECK-NEXT: ret i32 0
@@ -54,7 +54,7 @@
store i32 %X, i32* @G
ret void
}
-; CHECK: define void @test3a
+; CHECK-LABEL: define void @test3a(
; CHECK-NEXT: ret void
@@ -69,7 +69,7 @@
store i32 123, i32* @G
ret i32 0
}
-; CHECK: define i32 @test3b
+; CHECK-LABEL: define i32 @test3b(
; CHECK-NOT: store
; CHECK: ret i32 0
@@ -102,7 +102,7 @@
define internal i64 @test4c(i64 %a) {
ret i64 %a
}
-; CHECK: define internal i64 @test4c
+; CHECK-LABEL: define internal i64 @test4c(
; CHECK: ret i64 undef
@@ -149,7 +149,7 @@
%a = call i64 @test6a()
ret i64 %a
}
-; CHECK: define i64 @test6b
+; CHECK-LABEL: define i64 @test6b(
; CHECK: ret i64 0
;;======================== test7
@@ -172,7 +172,7 @@
%Y = extractvalue %T %X, 0
%Z = add i32 %Y, %Y
ret i32 %Z
-; CHECK: define i32 @test7b
+; CHECK-LABEL: define i32 @test7b(
; CHECK-NEXT: call %T @test7a(i32 17)
; CHECK-NEXT: ret i32 36
}
@@ -191,7 +191,7 @@
define void @test8b(i32* %P) {
%X = call {} @test8a(i32 5, i32* %P)
ret void
-; CHECK: define void @test8b
+; CHECK-LABEL: define void @test8b(
; CHECK-NEXT: call {} @test8a
; CHECK-NEXT: ret void
}
@@ -216,7 +216,7 @@
entry:
%call = call i32 @test10b(i32 undef)
ret i32 %call
-; CHECK: define i32 @test10a
+; CHECK-LABEL: define i32 @test10a(
; CHECK: ret i32 0
}
@@ -224,6 +224,6 @@
entry:
%r = and i32 %x, 1
ret i32 %r
-; CHECK: define internal i32 @test10b
+; CHECK-LABEL: define internal i32 @test10b(
; CHECK: ret i32 undef
}
diff --git a/llvm/test/Transforms/SCCP/switch.ll b/llvm/test/Transforms/SCCP/switch.ll
index 9f93423..155faa5 100644
--- a/llvm/test/Transforms/SCCP/switch.ll
+++ b/llvm/test/Transforms/SCCP/switch.ll
@@ -4,7 +4,7 @@
; with no cases.
declare void @foo()
define void @test1() {
-; CHECK: define void @test1
+; CHECK-LABEL: define void @test1(
; CHECK: call void @foo()
switch i32 undef, label %d []
d: