summaryrefslogtreecommitdiff
path: root/test/CodeGen/PowerPC/sign_ext_inreg1.ll
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2007-04-17 19:03:02 +0000
committerChris Lattner <sabre@nondot.org>2007-04-17 19:03:02 +0000
commit84e8315aaaf558195c73f0c04e9a1b1bc4dbd293 (patch)
tree5f2e81ea8ac4faead112f2bf9c878420611a60c6 /test/CodeGen/PowerPC/sign_ext_inreg1.ll
parent47e756c11edbaa9a4916687eceaa4ec94c0aae3b (diff)
downloadllvm-84e8315aaaf558195c73f0c04e9a1b1bc4dbd293.tar.gz
llvm-84e8315aaaf558195c73f0c04e9a1b1bc4dbd293.tar.bz2
llvm-84e8315aaaf558195c73f0c04e9a1b1bc4dbd293.tar.xz
new testcase
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36211 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/CodeGen/PowerPC/sign_ext_inreg1.ll')
-rw-r--r--test/CodeGen/PowerPC/sign_ext_inreg1.ll12
1 files changed, 12 insertions, 0 deletions
diff --git a/test/CodeGen/PowerPC/sign_ext_inreg1.ll b/test/CodeGen/PowerPC/sign_ext_inreg1.ll
new file mode 100644
index 0000000000..0e67f77038
--- /dev/null
+++ b/test/CodeGen/PowerPC/sign_ext_inreg1.ll
@@ -0,0 +1,12 @@
+; RUN: llvm-as < %s | llc -march=ppc32 | grep srwi
+; RUN: llvm-as < %s | llc -march=ppc32 | not grep rlwimi
+
+define i32 @baz(i64 %a) {
+ %tmp29 = lshr i64 %a, 24 ; <i64> [#uses=1]
+ %tmp23 = trunc i64 %tmp29 to i32 ; <i32> [#uses=1]
+ %tmp410 = lshr i32 %tmp23, 9 ; <i32> [#uses=1]
+ %tmp45 = trunc i32 %tmp410 to i16 ; <i16> [#uses=1]
+ %tmp456 = sext i16 %tmp45 to i32 ; <i32> [#uses=1]
+ ret i32 %tmp456
+}
+