mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2026-04-20 16:17:38 +00:00
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
This commit is contained in:
@@ -7,7 +7,7 @@ declare void @llvm.lifetime.start(i64 %size, i8* nocapture %ptr)
|
||||
@glbl = external global i32
|
||||
|
||||
define void @outer1() {
|
||||
; CHECK: @outer1
|
||||
; CHECK-LABEL: @outer1(
|
||||
; CHECK-NOT: call void @inner1
|
||||
%ptr = alloca i32
|
||||
call void @inner1(i32* %ptr)
|
||||
@@ -26,7 +26,7 @@ define void @inner1(i32 *%ptr) {
|
||||
}
|
||||
|
||||
define void @outer2() {
|
||||
; CHECK: @outer2
|
||||
; CHECK-LABEL: @outer2(
|
||||
; CHECK: call void @inner2
|
||||
%ptr = alloca i32
|
||||
call void @inner2(i32* %ptr)
|
||||
@@ -46,7 +46,7 @@ define void @inner2(i32 *%ptr) {
|
||||
}
|
||||
|
||||
define void @outer3() {
|
||||
; CHECK: @outer3
|
||||
; CHECK-LABEL: @outer3(
|
||||
; CHECK-NOT: call void @inner3
|
||||
%ptr = alloca i32
|
||||
call void @inner3(i32* %ptr, i1 undef)
|
||||
@@ -85,7 +85,7 @@ bb.false:
|
||||
}
|
||||
|
||||
define void @outer4(i32 %A) {
|
||||
; CHECK: @outer4
|
||||
; CHECK-LABEL: @outer4(
|
||||
; CHECK-NOT: call void @inner4
|
||||
%ptr = alloca i32
|
||||
call void @inner4(i32* %ptr, i32 %A)
|
||||
@@ -126,7 +126,7 @@ bb.false:
|
||||
}
|
||||
|
||||
define void @outer5() {
|
||||
; CHECK: @outer5
|
||||
; CHECK-LABEL: @outer5(
|
||||
; CHECK-NOT: call void @inner5
|
||||
%ptr = alloca i32
|
||||
call void @inner5(i1 false, i32* %ptr)
|
||||
|
||||
@@ -8,7 +8,7 @@ define i32 @inner1() alwaysinline {
|
||||
ret i32 1
|
||||
}
|
||||
define i32 @outer1() {
|
||||
; CHECK: @outer1
|
||||
; CHECK-LABEL: @outer1(
|
||||
; CHECK-NOT: call
|
||||
; CHECK: ret
|
||||
|
||||
@@ -17,7 +17,7 @@ define i32 @outer1() {
|
||||
}
|
||||
|
||||
; The always inliner can't DCE internal functions. PR2945
|
||||
; CHECK: @pr2945
|
||||
; CHECK-LABEL: @pr2945(
|
||||
define internal i32 @pr2945() nounwind {
|
||||
ret i32 0
|
||||
}
|
||||
@@ -31,7 +31,7 @@ define void @outer2(i32 %N) {
|
||||
; a function with a dynamic alloca into one without a dynamic alloca.
|
||||
; rdar://6655932
|
||||
;
|
||||
; CHECK: @outer2
|
||||
; CHECK-LABEL: @outer2(
|
||||
; CHECK-NOT: call void @inner2
|
||||
; CHECK-NOT: call void @inner2
|
||||
; CHECK: ret void
|
||||
@@ -51,7 +51,7 @@ entry:
|
||||
}
|
||||
define i32 @outer3() {
|
||||
entry:
|
||||
; CHECK: @outer3
|
||||
; CHECK-LABEL: @outer3(
|
||||
; CHECK-NOT: call i32 @a
|
||||
; CHECK: ret
|
||||
|
||||
@@ -69,7 +69,7 @@ entry:
|
||||
|
||||
define i32 @outer4() {
|
||||
entry:
|
||||
; CHECK: @outer4
|
||||
; CHECK-LABEL: @outer4(
|
||||
; CHECK: call i32 @b()
|
||||
; CHECK: ret
|
||||
|
||||
@@ -89,7 +89,7 @@ two:
|
||||
ret i32 44
|
||||
}
|
||||
define i32 @outer5(i32 %x) {
|
||||
; CHECK: @outer5
|
||||
; CHECK-LABEL: @outer5(
|
||||
; CHECK: call i32 @inner5
|
||||
; CHECK: ret
|
||||
|
||||
@@ -113,7 +113,7 @@ return:
|
||||
ret void
|
||||
}
|
||||
define void @outer6() {
|
||||
; CHECK: @outer6
|
||||
; CHECK-LABEL: @outer6(
|
||||
; CHECK: call void @inner6(i32 42)
|
||||
; CHECK: ret
|
||||
|
||||
|
||||
@@ -9,7 +9,7 @@ define i32 @test1(i32 %W) {
|
||||
%X = call i32 @test1f(i32 7)
|
||||
%Y = add i32 %X, %W
|
||||
ret i32 %Y
|
||||
; CHECK: @test1(
|
||||
; CHECK-LABEL: @test1(
|
||||
; CHECK-NEXT: %Y = add i32 7, %W
|
||||
; CHECK-NEXT: ret i32 %Y
|
||||
}
|
||||
@@ -20,7 +20,7 @@ define i32 @test1(i32 %W) {
|
||||
|
||||
%T = type { i32, i32 }
|
||||
|
||||
; CHECK-NOT: @test2f
|
||||
; CHECK-NOT-LABEL: @test2f(
|
||||
define internal %T* @test2f(i1 %cond, %T* %P) {
|
||||
br i1 %cond, label %T, label %F
|
||||
|
||||
@@ -41,7 +41,7 @@ define i32 @test2(i1 %cond) {
|
||||
%D = load i32* %C
|
||||
ret i32 %D
|
||||
|
||||
; CHECK: @test2(
|
||||
; CHECK-LABEL: @test2(
|
||||
; CHECK-NOT: = alloca
|
||||
; CHECK: ret i32
|
||||
}
|
||||
@@ -75,7 +75,7 @@ define i32 @test3() {
|
||||
;
|
||||
; The call to @h *can* be inlined.
|
||||
|
||||
; CHECK: @test
|
||||
; CHECK-LABEL: @test(
|
||||
define i32 @test() {
|
||||
; CHECK: call i32 @f()
|
||||
%a = call i32 @f()
|
||||
|
||||
@@ -40,5 +40,5 @@ define i32 @test2(i8* %this) ssp align 2 {
|
||||
ret i32 %X
|
||||
}
|
||||
|
||||
; CHECK: @test2
|
||||
; CHECK-LABEL: @test2(
|
||||
; CHECK-NEXT: ret i32 41
|
||||
|
||||
@@ -14,7 +14,7 @@ entry:
|
||||
%X = add i32 %call, 4
|
||||
ret i32 %X
|
||||
|
||||
; CHECK: @foo
|
||||
; CHECK-LABEL: @foo(
|
||||
; CHECK-NEXT: entry:
|
||||
; CHECK-NEXT: store
|
||||
; CHECK-NEXT: store
|
||||
|
||||
@@ -19,7 +19,7 @@ define internal void @callee(i32 %N) {
|
||||
}
|
||||
|
||||
define void @foo(i32 %N) {
|
||||
; CHECK: @foo
|
||||
; CHECK-LABEL: @foo(
|
||||
; CHECK: alloca i32, i32 %{{.*}}
|
||||
; CHECK: call i8* @llvm.stacksave()
|
||||
; CHECK: alloca i32, i32 %{{.*}}
|
||||
|
||||
@@ -12,9 +12,9 @@ entry:
|
||||
%call = tail call i32 %tmp3() nounwind ; <i32> [#uses=1]
|
||||
ret i32 %call
|
||||
}
|
||||
; CHECK: @foo
|
||||
; CHECK-LABEL: @foo(
|
||||
; CHECK: ret i32 7
|
||||
; CHECK: @bar
|
||||
; CHECK-LABEL: @bar(
|
||||
; CHECK: ret i32 7
|
||||
|
||||
define internal i32 @bar() nounwind readnone ssp {
|
||||
|
||||
@@ -21,7 +21,7 @@ define i32 @caller(%struct.sphere* %i) {
|
||||
%call = call i32 @ray_sphere(%struct.sphere* %i, %struct.ray* byval align 8 %shadow_ray, %struct.spoint* null)
|
||||
ret i32 %call
|
||||
|
||||
; CHECK: @caller
|
||||
; CHECK-LABEL: @caller(
|
||||
; CHECK-NOT: call i32 @ray_sphere
|
||||
; CHECK: ret i32
|
||||
}
|
||||
|
||||
@@ -52,7 +52,7 @@ UnifiedReturnBlock: ; preds = %cond_next13
|
||||
declare void @ext(i32*)
|
||||
|
||||
define void @test() {
|
||||
; CHECK: @test
|
||||
; CHECK-LABEL: @test(
|
||||
; CHECK-NOT: ret
|
||||
;
|
||||
; FIXME: This should be a CHECK-NOT, but currently we have a bug that causes us
|
||||
@@ -202,7 +202,7 @@ for.cond12.for.inc26_crit_edge.2:
|
||||
}
|
||||
|
||||
define void @crasher_outer() {
|
||||
; CHECK: @crasher_outer
|
||||
; CHECK-LABEL: @crasher_outer(
|
||||
; CHECK-NOT: call
|
||||
; CHECK: ret void
|
||||
; CHECK-NOT: ret
|
||||
|
||||
@@ -21,7 +21,7 @@ define i32 @caller2() {
|
||||
; inline and be cheap. We should eventually do that and lower the threshold here
|
||||
; to 1.
|
||||
;
|
||||
; CHECK: @caller2
|
||||
; CHECK-LABEL: @caller2(
|
||||
; CHECK-NOT: call void @callee2
|
||||
; CHECK: ret
|
||||
|
||||
@@ -61,7 +61,7 @@ define i32 @caller3() {
|
||||
; it doesn't count toward the inline cost when constant-prop proves those paths
|
||||
; dead.
|
||||
;
|
||||
; CHECK: @caller3
|
||||
; CHECK-LABEL: @caller3(
|
||||
; CHECK-NOT: call
|
||||
; CHECK: ret i32 6
|
||||
|
||||
@@ -119,7 +119,7 @@ define i8 @caller4(i8 %z) {
|
||||
; as they are used heavily in standard library code and generic C++ code where
|
||||
; the arguments are oftent constant but complete generality is required.
|
||||
;
|
||||
; CHECK: @caller4
|
||||
; CHECK-LABEL: @caller4(
|
||||
; CHECK-NOT: call
|
||||
; CHECK: ret i8 -1
|
||||
|
||||
@@ -153,7 +153,7 @@ define i64 @caller5(i64 %y) {
|
||||
; Check that we can round trip constants through various kinds of casts etc w/o
|
||||
; losing track of the constant prop in the inline cost analysis.
|
||||
;
|
||||
; CHECK: @caller5
|
||||
; CHECK-LABEL: @caller5(
|
||||
; CHECK-NOT: call
|
||||
; CHECK: ret i64 -1
|
||||
|
||||
|
||||
@@ -200,7 +200,7 @@ for.end21: ; preds = %for.cond14
|
||||
|
||||
define i32 @fct3(i32 %c) nounwind uwtable ssp {
|
||||
entry:
|
||||
;CHECK: @fct3
|
||||
;CHECK-LABEL: @fct3(
|
||||
;CHECK: call i32 @fct1
|
||||
; The inline keyword gives a sufficient benefits to inline fct2
|
||||
;CHECK-NOT: call i32 @fct2
|
||||
@@ -216,7 +216,7 @@ entry:
|
||||
|
||||
define i32 @fct4(i32 %c) minsize nounwind uwtable ssp {
|
||||
entry:
|
||||
;CHECK: @fct4
|
||||
;CHECK-LABEL: @fct4(
|
||||
;CHECK: call i32 @fct1
|
||||
; With Oz (minsize attribute), the benefit of inlining fct2
|
||||
; is the same as fct1, thus no inlining for fct2
|
||||
|
||||
@@ -10,7 +10,7 @@ define void @helper() {
|
||||
|
||||
; Size in llvm.lifetime.X should be -1 (unknown).
|
||||
define void @test() {
|
||||
; CHECK: @test
|
||||
; CHECK-LABEL: @test(
|
||||
; CHECK-NOT: lifetime
|
||||
; CHECK: llvm.lifetime.start(i64 -1
|
||||
; CHECK-NOT: lifetime
|
||||
|
||||
@@ -14,7 +14,7 @@ define void @helper_both_markers() {
|
||||
}
|
||||
|
||||
define void @test_both_markers() {
|
||||
; CHECK: @test_both_markers
|
||||
; CHECK-LABEL: @test_both_markers(
|
||||
; CHECK: llvm.lifetime.start(i64 2
|
||||
; CHECK-NEXT: llvm.lifetime.end(i64 2
|
||||
call void @helper_both_markers()
|
||||
@@ -38,7 +38,7 @@ define void @helper_no_markers() {
|
||||
;; We can't use CHECK-NEXT because there's an extra call void @use in between.
|
||||
;; Instead, we use CHECK-NOT to verify that there are no other lifetime calls.
|
||||
define void @test_no_marker() {
|
||||
; CHECK: @test_no_marker
|
||||
; CHECK-LABEL: @test_no_marker(
|
||||
; CHECK-NOT: lifetime
|
||||
; CHECK: llvm.lifetime.start(i64 1
|
||||
; CHECK-NOT: lifetime
|
||||
@@ -64,7 +64,7 @@ define void @helper_two_casts() {
|
||||
}
|
||||
|
||||
define void @test_two_casts() {
|
||||
; CHECK: @test_two_casts
|
||||
; CHECK-LABEL: @test_two_casts(
|
||||
; CHECK-NOT: lifetime
|
||||
; CHECK: llvm.lifetime.start(i64 4
|
||||
; CHECK-NOT: lifetime
|
||||
@@ -88,7 +88,7 @@ define void @helper_arrays_alloca() {
|
||||
}
|
||||
|
||||
define void @test_arrays_alloca() {
|
||||
; CHECK: @test_arrays_alloca
|
||||
; CHECK-LABEL: @test_arrays_alloca(
|
||||
; CHECK-NOT: lifetime
|
||||
; CHECK: llvm.lifetime.start(i64 40,
|
||||
; CHECK-NOT: lifetime
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
|
||||
define fastcc void @foo(i32 %X) {
|
||||
entry:
|
||||
; CHECK: @foo
|
||||
; CHECK-LABEL: @foo(
|
||||
%ALL = alloca i32, align 4 ; <i32*> [#uses=1]
|
||||
%tmp1 = and i32 %X, 1 ; <i32> [#uses=1]
|
||||
%tmp1.upgrd.1 = icmp eq i32 %tmp1, 0 ; <i1> [#uses=1]
|
||||
@@ -47,7 +47,7 @@ UnifiedReturnBlock: ; preds = %cond_next13
|
||||
ret void
|
||||
}
|
||||
|
||||
; CHECK-NOT: @bar
|
||||
; CHECK-NOT-LABEL: @bar(
|
||||
define internal fastcc void @bar(i32 %X) {
|
||||
entry:
|
||||
%ALL = alloca i32, align 4 ; <i32*> [#uses=1]
|
||||
@@ -101,7 +101,7 @@ declare void @ext(i32*)
|
||||
define void @test(i32 %X) {
|
||||
entry:
|
||||
; CHECK: test
|
||||
; CHECK-NOT: @bar
|
||||
; CHECK-NOT-LABEL: @bar(
|
||||
tail call fastcc void @bar( i32 %X )
|
||||
tail call fastcc void @bar( i32 %X )
|
||||
tail call fastcc void @bar2( i32 %X )
|
||||
|
||||
@@ -25,7 +25,7 @@ return: ; preds = %entry
|
||||
}
|
||||
|
||||
|
||||
;; CHECK: @bonk
|
||||
;; CHECK-LABEL: @bonk(
|
||||
;; CHECK: call void @foo(i32 42)
|
||||
define void @bonk() nounwind ssp {
|
||||
entry:
|
||||
@@ -62,7 +62,7 @@ return: ; preds = %entry
|
||||
}
|
||||
|
||||
|
||||
; CHECK: @top_level
|
||||
; CHECK-LABEL: @top_level(
|
||||
; CHECK: call void @f2(i32 122
|
||||
; Here we inline one instance of the cycle, but we don't want to completely
|
||||
; unroll it.
|
||||
@@ -100,7 +100,7 @@ one.else:
|
||||
}
|
||||
|
||||
define i32 @fib_caller() {
|
||||
; CHECK: @fib_caller
|
||||
; CHECK-LABEL: @fib_caller(
|
||||
; CHECK-NOT: call
|
||||
; CHECK: ret
|
||||
%f1 = call i32 @fib(i32 0)
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
target datalayout = "p:32:32"
|
||||
|
||||
define i32 @outer1() {
|
||||
; CHECK: @outer1
|
||||
; CHECK-LABEL: @outer1(
|
||||
; CHECK-NOT: call
|
||||
; CHECK: ret i32
|
||||
|
||||
@@ -32,7 +32,7 @@ else:
|
||||
define i32 @outer2(i32* %ptr) {
|
||||
; Test that an inbounds GEP disables this -- it isn't safe in general as
|
||||
; wrapping changes the behavior of lessthan and greaterthan comparisions.
|
||||
; CHECK: @outer2
|
||||
; CHECK-LABEL: @outer2(
|
||||
; CHECK: call i32 @inner2
|
||||
; CHECK: ret i32
|
||||
|
||||
|
||||
Reference in New Issue
Block a user