summaryrefslogtreecommitdiffstats
path: root/llvm/test/CodeGen/Mips/2008-07-16-SignExtInReg.ll
diff options
context:
space:
mode:
authorBruno Cardoso Lopes <bruno.cardoso@gmail.com>2008-08-08 04:08:30 +0000
committerBruno Cardoso Lopes <bruno.cardoso@gmail.com>2008-08-08 04:08:30 +0000
commit32d4b5a44e13ea12aec10d52434df28b6a86fe2f (patch)
treebbafc524f76d285b48032a1be323fcfb40846c1f /llvm/test/CodeGen/Mips/2008-07-16-SignExtInReg.ll
parent118a9e4813652022945089efaadfbdace8e717d1 (diff)
downloadbcm5719-llvm-32d4b5a44e13ea12aec10d52434df28b6a86fe2f.tar.gz
bcm5719-llvm-32d4b5a44e13ea12aec10d52434df28b6a86fe2f.zip
Batch 4 of Mips CodeGen tests
llvm-svn: 54509
Diffstat (limited to 'llvm/test/CodeGen/Mips/2008-07-16-SignExtInReg.ll')
-rw-r--r--llvm/test/CodeGen/Mips/2008-07-16-SignExtInReg.ll19
1 files changed, 19 insertions, 0 deletions
diff --git a/llvm/test/CodeGen/Mips/2008-07-16-SignExtInReg.ll b/llvm/test/CodeGen/Mips/2008-07-16-SignExtInReg.ll
new file mode 100644
index 00000000000..872f65d847f
--- /dev/null
+++ b/llvm/test/CodeGen/Mips/2008-07-16-SignExtInReg.ll
@@ -0,0 +1,19 @@
+; RUN: llvm-as < %s | llc -enable-legalize-types -march=mips -f -o %t
+; RUN: grep seh %t | count 1
+; RUN: grep seb %t | count 1
+
+target datalayout = "e-p:32:32:32-i1:8:8-i8:8:32-i16:16:32-i32:32:32-i64:32:64-f32:32:32-f64:64:64-v64:64:64-v128:128:128-a0:0:64"
+target triple = "mipsallegrexel-psp-elf"
+
+define i8 @A(i8 %e.0, i8 signext %sum) signext nounwind {
+entry:
+ add i8 %sum, %e.0 ; <i8>:0 [#uses=1]
+ ret i8 %0
+}
+
+define i16 @B(i16 %e.0, i16 signext %sum) signext nounwind {
+entry:
+ add i16 %sum, %e.0 ; <i16>:0 [#uses=1]
+ ret i16 %0
+}
+
OpenPOWER on IntegriCloud