aboutsummaryrefslogtreecommitdiffstats
path: root/test/CodeGen/PowerPC/rlwimi3.ll
diff options
context:
space:
mode:
authorDan Gohman <djg@cray.com>2007-07-18 16:29:46 +0000
committerDan Gohman <djg@cray.com>2007-07-18 16:29:46 +0000
commitf17a25c88b892d30c2b41ba7ecdfbdfb2b4be9cc (patch)
treeebb79ea1ee5e3bc1fdf38541a811a8b804f0679a /test/CodeGen/PowerPC/rlwimi3.ll
downloadexternal_llvm-f17a25c88b892d30c2b41ba7ecdfbdfb2b4be9cc.zip
external_llvm-f17a25c88b892d30c2b41ba7ecdfbdfb2b4be9cc.tar.gz
external_llvm-f17a25c88b892d30c2b41ba7ecdfbdfb2b4be9cc.tar.bz2
It's not necessary to do rounding for alloca operations when the requested
alignment is equal to the stack alignment. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@40004 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/CodeGen/PowerPC/rlwimi3.ll')
-rw-r--r--test/CodeGen/PowerPC/rlwimi3.ll26
1 files changed, 26 insertions, 0 deletions
diff --git a/test/CodeGen/PowerPC/rlwimi3.ll b/test/CodeGen/PowerPC/rlwimi3.ll
new file mode 100644
index 0000000..b313ef9
--- /dev/null
+++ b/test/CodeGen/PowerPC/rlwimi3.ll
@@ -0,0 +1,26 @@
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc32 -stats |& \
+; RUN: 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
+}
+