aboutsummaryrefslogtreecommitdiffstats
path: root/test/CodeGen
diff options
context:
space:
mode:
authorBill Wendling <isanbard@gmail.com>2007-03-15 21:24:36 +0000
committerBill Wendling <isanbard@gmail.com>2007-03-15 21:24:36 +0000
commit74027e98f1127fd7a91305e7fa7876f15c1c4e59 (patch)
tree3f83c738515d4dfe2268f0e41c0839c34a84f7c6 /test/CodeGen
parent56fdd7af884a35673fb6dd3e01333960922c3ac2 (diff)
downloadexternal_llvm-74027e98f1127fd7a91305e7fa7876f15c1c4e59.zip
external_llvm-74027e98f1127fd7a91305e7fa7876f15c1c4e59.tar.gz
external_llvm-74027e98f1127fd7a91305e7fa7876f15c1c4e59.tar.bz2
Multiplication support for MMX.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35118 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/CodeGen')
-rw-r--r--test/CodeGen/X86/mmx-arith.ll17
1 files changed, 17 insertions, 0 deletions
diff --git a/test/CodeGen/X86/mmx-arith.ll b/test/CodeGen/X86/mmx-arith.ll
index 7c71cfc..7c881c4 100644
--- a/test/CodeGen/X86/mmx-arith.ll
+++ b/test/CodeGen/X86/mmx-arith.ll
@@ -23,6 +23,9 @@ entry:
%tmp89 = load <8 x i8>* %B ; <<8 x i8>> [#uses=1]
%tmp105 = tail call <8 x i8> @llvm.x86.mmx.psubus.b( <8 x i8> %tmp80, <8 x i8> %tmp89 ) ; <<8 x i8>> [#uses=1]
store <8 x i8> %tmp105, <8 x i8>* %A
+ %tmp13 = load <8 x i8>* %A ; <<8 x i8>> [#uses=1]
+ %tmp16 = mul <8 x i8> %tmp13, %tmp105 ; <<8 x i8>> [#uses=1]
+ store <8 x i8> %tmp16, <8 x i8>* %B
tail call void @llvm.x86.mmx.emms( )
ret void
}
@@ -36,6 +39,9 @@ entry:
%tmp9 = load <2 x i32>* %B ; <<2 x i32>> [#uses=1]
%tmp10 = sub <2 x i32> %tmp4, %tmp9 ; <<2 x i32>> [#uses=1]
store <2 x i32> %tmp10, <2 x i32>* %B
+ %tmp13 = load <2 x i32>* %A ; <<2 x i32>> [#uses=1]
+ %tmp16 = mul <2 x i32> %tmp13, %tmp10 ; <<2 x i32>> [#uses=1]
+ store <2 x i32> %tmp16, <2 x i32>* %B
tail call void @llvm.x86.mmx.emms( )
ret void
}
@@ -61,6 +67,13 @@ entry:
%tmp89 = load <4 x i16>* %B ; <<4 x i16>> [#uses=1]
%tmp105 = tail call <4 x i16> @llvm.x86.mmx.psubus.w( <4 x i16> %tmp80, <4 x i16> %tmp89 ) ; <<4 x i16>> [#uses=1]
store <4 x i16> %tmp105, <4 x i16>* %A
+ %tmp22 = load <4 x i16>* %A ; <<4 x i16>> [#uses=1]
+ %tmp24 = tail call <4 x i16> @llvm.x86.mmx.pmulh.w( <4 x i16> %tmp22, <4 x i16> %tmp105 ) ; <<4 x i16>> [#uses=2]
+ store <4 x i16> %tmp24, <4 x i16>* %A
+ %tmp28 = load <4 x i16>* %B ; <<4 x i16>> [#uses=1]
+ %tmp33 = tail call <2 x i32> @llvm.x86.mmx.pmadd.wd( <4 x i16> %tmp24, <4 x i16> %tmp28 ) ; <<2 x i32>> [#uses=1]
+ %tmp34 = bitcast <2 x i32> %tmp33 to <4 x i16> ; <<4 x i16>> [#uses=1]
+ store <4 x i16> %tmp34, <4 x i16>* %A
tail call void @llvm.x86.mmx.emms( )
ret void
}
@@ -81,4 +94,8 @@ declare <8 x i8> @llvm.x86.mmx.psubs.b(<8 x i8>, <8 x i8>)
declare <8 x i8> @llvm.x86.mmx.psubus.b(<8 x i8>, <8 x i8>)
+declare <4 x i16> @llvm.x86.mmx.pmulh.w(<4 x i16>, <4 x i16>)
+
+declare <2 x i32> @llvm.x86.mmx.pmadd.wd(<4 x i16>, <4 x i16>)
+
declare void @llvm.x86.mmx.emms()