summaryrefslogtreecommitdiffstats
path: root/llvm/test/CodeGen/CellSPU
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
commit6e5a54b36c083542d8f987929111043a0afb1c07 (patch)
tree3a965d909d1ee7eadab150ed2caabf4ebf29270f /llvm/test/CodeGen/CellSPU
parent8fb2c3827c2e85edca529380ae9e125713884126 (diff)
downloadbcm5719-llvm-6e5a54b36c083542d8f987929111043a0afb1c07.tar.gz
bcm5719-llvm-6e5a54b36c083542d8f987929111043a0afb1c07.zip
Allow sign-extending of i8 and i16 to i128 on SPU.
llvm-svn: 123912
Diffstat (limited to 'llvm/test/CodeGen/CellSPU')
-rw-r--r--llvm/test/CodeGen/CellSPU/sext128.ll21
1 files changed, 21 insertions, 0 deletions
diff --git a/llvm/test/CodeGen/CellSPU/sext128.ll b/llvm/test/CodeGen/CellSPU/sext128.ll
index 027c1c58afb..6ae9aa51202 100644
--- a/llvm/test/CodeGen/CellSPU/sext128.ll
+++ b/llvm/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
+}
OpenPOWER on IntegriCloud