2010-10-01 08:50:12 +00:00
|
|
|
; RUN: llc < %s -march=x86 -mattr=+mmx,+sse2 | FileCheck %s
|
|
|
|
; RUN: llc < %s -march=x86 -mattr=+mmx,+sse2 | FileCheck %s
|
2010-09-30 23:57:10 +00:00
|
|
|
; There are no MMX operations in bork; promoted to XMM.
|
2007-04-24 22:28:30 +00:00
|
|
|
|
|
|
|
define void @bork(<1 x i64>* %x) {
|
2010-10-01 08:50:12 +00:00
|
|
|
; CHECK: pextrd
|
2007-04-24 22:28:30 +00:00
|
|
|
entry:
|
|
|
|
%tmp2 = load <1 x i64>* %x ; <<1 x i64>> [#uses=1]
|
|
|
|
%tmp6 = bitcast <1 x i64> %tmp2 to <2 x i32> ; <<2 x i32>> [#uses=1]
|
|
|
|
%tmp9 = shufflevector <2 x i32> %tmp6, <2 x i32> undef, <2 x i32> < i32 1, i32 1 > ; <<2 x i32>> [#uses=1]
|
|
|
|
%tmp10 = bitcast <2 x i32> %tmp9 to <1 x i64> ; <<1 x i64>> [#uses=1]
|
|
|
|
store <1 x i64> %tmp10, <1 x i64>* %x
|
|
|
|
tail call void @llvm.x86.mmx.emms( )
|
|
|
|
ret void
|
|
|
|
}
|
|
|
|
|
2010-09-30 23:57:10 +00:00
|
|
|
; pork uses MMX.
|
|
|
|
|
|
|
|
define void @pork(x86_mmx* %x) {
|
2010-10-01 08:50:12 +00:00
|
|
|
; CHECK: punpckhdq
|
2010-09-30 23:57:10 +00:00
|
|
|
entry:
|
|
|
|
%tmp2 = load x86_mmx* %x ; <x86_mmx> [#uses=1]
|
|
|
|
%tmp9 = tail call x86_mmx @llvm.x86.mmx.punpckhdq (x86_mmx %tmp2, x86_mmx %tmp2)
|
|
|
|
store x86_mmx %tmp9, x86_mmx* %x
|
|
|
|
tail call void @llvm.x86.mmx.emms( )
|
|
|
|
ret void
|
|
|
|
}
|
|
|
|
|
|
|
|
declare x86_mmx @llvm.x86.mmx.punpckhdq(x86_mmx, x86_mmx)
|
2007-04-24 22:28:30 +00:00
|
|
|
declare void @llvm.x86.mmx.emms()
|