1 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py 2 ; RUN: llc < %s -mtriple=x86_64-apple-darwin -mattr=+mmx | FileCheck %s 3 4 @R = external global x86_mmx ; <x86_mmx*> [#uses=1] 5 6 define void @foo(<1 x i64> %A, <1 x i64> %B) nounwind { 7 ; CHECK-LABEL: foo: 8 ; CHECK: ## %bb.0: ## %entry 9 ; CHECK-NEXT: movq %rsi, %mm0 10 ; CHECK-NEXT: movq %rdi, %mm1 11 ; CHECK-NEXT: paddusw %mm0, %mm1 12 ; CHECK-NEXT: movq _R@{{.*}}(%rip), %rax 13 ; CHECK-NEXT: movq %mm1, (%rax) 14 ; CHECK-NEXT: emms 15 ; CHECK-NEXT: retq 16 entry: 17 %tmp4 = bitcast <1 x i64> %B to x86_mmx ; <<4 x i16>> [#uses=1] 18 %tmp6 = bitcast <1 x i64> %A to x86_mmx ; <<4 x i16>> [#uses=1] 19 %tmp7 = tail call x86_mmx @llvm.x86.mmx.paddus.w( x86_mmx %tmp6, x86_mmx %tmp4 ) ; <x86_mmx> [#uses=1] 20 store x86_mmx %tmp7, x86_mmx* @R 21 tail call void @llvm.x86.mmx.emms( ) 22 ret void 23 } 24 25 declare x86_mmx @llvm.x86.mmx.paddus.w(x86_mmx, x86_mmx) 26 declare void @llvm.x86.mmx.emms() 27