summaryrefslogtreecommitdiffstats
path: root/llvm/test/Regression/CodeGen/PowerPC
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2006-09-10 18:52:25 +0000
committerChris Lattner <sabre@nondot.org>2006-09-10 18:52:25 +0000
commit33ce390fceb0e90d8f7253405eabca1e66e83ef1 (patch)
tree96dec4c45e730248cc75c213231f8f5e6a25cbe1 /llvm/test/Regression/CodeGen/PowerPC
parentd1f8e07808e02e9d78809c75e82957e97d7e82f0 (diff)
downloadbcm5719-llvm-33ce390fceb0e90d8f7253405eabca1e66e83ef1.tar.gz
bcm5719-llvm-33ce390fceb0e90d8f7253405eabca1e66e83ef1.zip
add a testcase for this commit: http://lists.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20050606/026673.html
llvm-svn: 30238
Diffstat (limited to 'llvm/test/Regression/CodeGen/PowerPC')
-rw-r--r--llvm/test/Regression/CodeGen/PowerPC/rlwimi3.ll25
1 files changed, 25 insertions, 0 deletions
diff --git a/llvm/test/Regression/CodeGen/PowerPC/rlwimi3.ll b/llvm/test/Regression/CodeGen/PowerPC/rlwimi3.ll
new file mode 100644
index 00000000000..a55d88ba1c4
--- /dev/null
+++ b/llvm/test/Regression/CodeGen/PowerPC/rlwimi3.ll
@@ -0,0 +1,25 @@
+; RUN: llvm-as < %s | llc -march=ppc32 -stats 2>&1 | grep 'Number of machine instrs printed' | grep 12
+
+ushort %Trans16Bit(uint %srcA, uint %srcB, uint %alpha) {
+ %tmp1 = shl uint %srcA, ubyte 15 ; <uint> [#uses=1]
+ %tmp2 = and uint %tmp1, 32505856 ; <uint> [#uses=1]
+ %tmp4 = and uint %srcA, 31775 ; <uint> [#uses=1]
+ %tmp5 = or uint %tmp2, %tmp4 ; <uint> [#uses=1]
+ %tmp7 = shl uint %srcB, ubyte 15 ; <uint> [#uses=1]
+ %tmp8 = and uint %tmp7, 32505856 ; <uint> [#uses=1]
+ %tmp10 = and uint %srcB, 31775 ; <uint> [#uses=1]
+ %tmp11 = or uint %tmp8, %tmp10 ; <uint> [#uses=1]
+ %tmp14 = mul uint %tmp5, %alpha ; <uint> [#uses=1]
+ %tmp16 = sub uint 32, %alpha ; <uint> [#uses=1]
+ %tmp18 = mul uint %tmp11, %tmp16 ; <uint> [#uses=1]
+ %tmp19 = add uint %tmp18, %tmp14 ; <uint> [#uses=2]
+ %tmp21 = shr uint %tmp19, ubyte 5 ; <uint> [#uses=1]
+ %tmp21 = cast uint %tmp21 to ushort ; <ushort> [#uses=1]
+ %tmp = and ushort %tmp21, 31775 ; <ushort> [#uses=1]
+ %tmp23 = shr uint %tmp19, ubyte 20 ; <uint> [#uses=1]
+ %tmp23 = cast uint %tmp23 to ushort ; <ushort> [#uses=1]
+ %tmp24 = and ushort %tmp23, 992 ; <ushort> [#uses=1]
+ %tmp25 = or ushort %tmp, %tmp24 ; <ushort> [#uses=1]
+ ret ushort %tmp25
+}
+
OpenPOWER on IntegriCloud