From 74027e98f1127fd7a91305e7fa7876f15c1c4e59 Mon Sep 17 00:00:00 2001 From: Bill Wendling Date: Thu, 15 Mar 2007 21:24:36 +0000 Subject: Multiplication support for MMX. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35118 91177308-0d34-0410-b5e6-96231b3b80d8 --- test/CodeGen/X86/mmx-arith.ll | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'test/CodeGen') 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() -- cgit v1.1