diff options
Diffstat (limited to 'test/CodeGen')
-rw-r--r-- | test/CodeGen/PowerPC/tailcall1-64.ll | 11 | ||||
-rw-r--r-- | test/CodeGen/PowerPC/tailcall1.ll | 11 | ||||
-rw-r--r-- | test/CodeGen/PowerPC/tailcallpic1.ll | 14 |
3 files changed, 36 insertions, 0 deletions
diff --git a/test/CodeGen/PowerPC/tailcall1-64.ll b/test/CodeGen/PowerPC/tailcall1-64.ll new file mode 100644 index 0000000..f39b40b --- /dev/null +++ b/test/CodeGen/PowerPC/tailcall1-64.ll @@ -0,0 +1,11 @@ +; RUN: llvm-as < %s | llc -march=ppc64 -tailcallopt | grep TC_RETURNd8 +define fastcc i32 @tailcallee(i32 %a1, i32 %a2, i32 %a3, i32 %a4) { +entry: + ret i32 %a3 +} + +define fastcc i32 @tailcaller(i32 %in1, i32 %in2) { +entry: + %tmp11 = tail call fastcc i32 @tailcallee( i32 %in1, i32 %in2, i32 %in1, i32 %in2 ) ; <i32> [#uses=1] + ret i32 %tmp11 +} diff --git a/test/CodeGen/PowerPC/tailcall1.ll b/test/CodeGen/PowerPC/tailcall1.ll new file mode 100644 index 0000000..1fc4b94 --- /dev/null +++ b/test/CodeGen/PowerPC/tailcall1.ll @@ -0,0 +1,11 @@ +; RUN: llvm-as < %s | llc -march=ppc32 -tailcallopt | grep TC_RETURN +define fastcc i32 @tailcallee(i32 %a1, i32 %a2, i32 %a3, i32 %a4) { +entry: + ret i32 %a3 +} + +define fastcc i32 @tailcaller(i32 %in1, i32 %in2) { +entry: + %tmp11 = tail call fastcc i32 @tailcallee( i32 %in1, i32 %in2, i32 %in1, i32 %in2 ) ; <i32> [#uses=1] + ret i32 %tmp11 +} diff --git a/test/CodeGen/PowerPC/tailcallpic1.ll b/test/CodeGen/PowerPC/tailcallpic1.ll new file mode 100644 index 0000000..678d366 --- /dev/null +++ b/test/CodeGen/PowerPC/tailcallpic1.ll @@ -0,0 +1,14 @@ +; RUN: llvm-as < %s | llc -tailcallopt -mtriple=powerpc-apple-darwin -relocation-model=pic | grep TC_RETURN + + + +define protected fastcc i32 @tailcallee(i32 %a1, i32 %a2, i32 %a3, i32 %a4) { +entry: + ret i32 %a3 +} + +define fastcc i32 @tailcaller(i32 %in1, i32 %in2) { +entry: + %tmp11 = tail call fastcc i32 @tailcallee( i32 %in1, i32 %in2, i32 %in1, i32 %in2 ) ; <i32> [#uses=1] + ret i32 %tmp11 +} |