2018-02-21 23:05:47 +08:00
|
|
|
; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
|
2011-04-05 08:32:44 +08:00
|
|
|
; RUN: llc < %s -mtriple=x86_64-apple-darwin -mattr=+mmx | FileCheck %s
|
|
|
|
|
2010-10-01 07:57:10 +08:00
|
|
|
@R = external global x86_mmx ; <x86_mmx*> [#uses=1]
|
2007-07-04 08:19:54 +08:00
|
|
|
|
2008-05-06 02:24:33 +08:00
|
|
|
define void @foo(<1 x i64> %A, <1 x i64> %B) nounwind {
|
2018-02-21 23:05:47 +08:00
|
|
|
; CHECK-LABEL: foo:
|
|
|
|
; CHECK: ## %bb.0: ## %entry
|
|
|
|
; CHECK-NEXT: movq %rsi, %mm0
|
|
|
|
; CHECK-NEXT: movq %rdi, %mm1
|
|
|
|
; CHECK-NEXT: paddusw %mm0, %mm1
|
|
|
|
; CHECK-NEXT: movq _R@{{.*}}(%rip), %rax
|
|
|
|
; CHECK-NEXT: movq %mm1, (%rax)
|
|
|
|
; CHECK-NEXT: emms
|
|
|
|
; CHECK-NEXT: retq
|
2007-07-04 08:19:54 +08:00
|
|
|
entry:
|
2010-10-01 07:57:10 +08:00
|
|
|
%tmp4 = bitcast <1 x i64> %B to x86_mmx ; <<4 x i16>> [#uses=1]
|
|
|
|
%tmp6 = bitcast <1 x i64> %A to x86_mmx ; <<4 x i16>> [#uses=1]
|
|
|
|
%tmp7 = tail call x86_mmx @llvm.x86.mmx.paddus.w( x86_mmx %tmp6, x86_mmx %tmp4 ) ; <x86_mmx> [#uses=1]
|
|
|
|
store x86_mmx %tmp7, x86_mmx* @R
|
2007-07-04 08:19:54 +08:00
|
|
|
tail call void @llvm.x86.mmx.emms( )
|
|
|
|
ret void
|
|
|
|
}
|
|
|
|
|
2010-10-01 07:57:10 +08:00
|
|
|
declare x86_mmx @llvm.x86.mmx.paddus.w(x86_mmx, x86_mmx)
|
2007-07-04 08:19:54 +08:00
|
|
|
declare void @llvm.x86.mmx.emms()
|