summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorHal Finkel <hfinkel@anl.gov>2011-10-17 04:03:59 +0000
committerHal Finkel <hfinkel@anl.gov>2011-10-17 04:03:59 +0000
commit87525be07a94acbe0866ba96eddc5af40b863b74 (patch)
tree773541968bfb89b78bd0a767da7b6564c9fc3aad /test
parentb31d3d271f75c17593e917575dc324b50615a630 (diff)
downloadllvm-87525be07a94acbe0866ba96eddc5af40b863b74.tar.gz
llvm-87525be07a94acbe0866ba96eddc5af40b863b74.tar.bz2
llvm-87525be07a94acbe0866ba96eddc5af40b863b74.tar.xz
Test case for CanLowerReturn fix (r141981)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@142172 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test')
-rw-r--r--test/CodeGen/PowerPC/can-lower-ret.ll19
1 files changed, 19 insertions, 0 deletions
diff --git a/test/CodeGen/PowerPC/can-lower-ret.ll b/test/CodeGen/PowerPC/can-lower-ret.ll
new file mode 100644
index 0000000000..acf4104c0b
--- /dev/null
+++ b/test/CodeGen/PowerPC/can-lower-ret.ll
@@ -0,0 +1,19 @@
+; RUN: llc < %s -mtriple=powerpc-unknown-linux-gnu -mcpu=ppc
+; RUN: llc < %s -mtriple=powerpc64-unknown-linux-gnu -mcpu=ppc64
+
+define <4 x float> @foo1(<2 x float> %a, <2 x float> %b) nounwind readnone {
+entry:
+ %0 = shufflevector <2 x float> %a, <2 x float> undef, <4 x i32> <i32 0, i32 undef, i32 1, i32 undef>
+ %1 = shufflevector <2 x float> %b, <2 x float> undef, <4 x i32> <i32 0, i32 1, i32 undef, i32 undef>
+ %2 = shufflevector <4 x float> %0, <4 x float> %1, <4 x i32> <i32 0, i32 4, i32 2, i32 5>
+ ret <4 x float> %2
+}
+
+define <4 x double> @foo2(<2 x double> %a, <2 x double> %b) nounwind readnone {
+entry:
+ %0 = shufflevector <2 x double> %a, <2 x double> undef, <4 x i32> <i32 0, i32 undef, i32 1, i32 undef>
+ %1 = shufflevector <2 x double> %b, <2 x double> undef, <4 x i32> <i32 0, i32 1, i32 undef, i32 undef>
+ %2 = shufflevector <4 x double> %0, <4 x double> %1, <4 x i32> <i32 0, i32 4, i32 2, i32 5>
+ ret <4 x double> %2
+}
+