aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorKalle Raiskila <kalle.raiskila@nokia.com>2011-01-20 15:49:06 +0000
committerKalle Raiskila <kalle.raiskila@nokia.com>2011-01-20 15:49:06 +0000
commit5106b8450678b91b964575eaad300c41410aa7d6 (patch)
tree5d52f50fe7351c81e035c6bce02177a255f32e6b /test
parent9d32f60a6f7dbd8e83187481cd2ae0a2f3e726ce (diff)
downloadexternal_llvm-5106b8450678b91b964575eaad300c41410aa7d6.zip
external_llvm-5106b8450678b91b964575eaad300c41410aa7d6.tar.gz
external_llvm-5106b8450678b91b964575eaad300c41410aa7d6.tar.bz2
Allow sign-extending of i8 and i16 to i128 on SPU.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@123912 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test')
-rw-r--r--test/CodeGen/CellSPU/sext128.ll21
1 files changed, 21 insertions, 0 deletions
diff --git a/test/CodeGen/CellSPU/sext128.ll b/test/CodeGen/CellSPU/sext128.ll
index 027c1c5..6ae9aa5 100644
--- a/test/CodeGen/CellSPU/sext128.ll
+++ b/test/CodeGen/CellSPU/sext128.ll
@@ -48,3 +48,24 @@ entry:
}
declare i32 @myfunc(float)
+
+define i128 @func1(i8 %u) {
+entry:
+; CHECK: xsbh
+; CHECK: xshw
+; CHECK: rotmai
+; CHECK: shufb
+; CHECK: bi $lr
+ %0 = sext i8 %u to i128
+ ret i128 %0
+}
+
+define i128 @func2(i16 %u) {
+entry:
+; CHECK: xshw
+; CHECK: rotmai
+; CHECK: shufb
+; CHECK: bi $lr
+ %0 = sext i16 %u to i128
+ ret i128 %0
+}