2016-09-05 02:14:45 +08:00
|
|
|
; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
|
2013-01-09 02:27:24 +08:00
|
|
|
; RUN: llc < %s -mtriple=x86_64-apple-darwin11 -mcpu=core2 -mattr=+mmx,+sse2 | FileCheck %s
|
2009-02-21 04:43:02 +08:00
|
|
|
; rdar://6602459
|
|
|
|
|
|
|
|
@g_v1di = external global <1 x i64>
|
|
|
|
|
2009-02-22 16:05:12 +08:00
|
|
|
define void @t1() nounwind {
|
2013-07-14 14:24:09 +08:00
|
|
|
; CHECK-LABEL: t1:
|
2016-09-05 02:14:45 +08:00
|
|
|
; CHECK: ## BB#0: ## %entry
|
|
|
|
; CHECK-NEXT: pushq %rax
|
|
|
|
; CHECK-NEXT: callq _return_v1di
|
|
|
|
; CHECK-NEXT: movq _g_v1di@{{.*}}(%rip), %rcx
|
|
|
|
; CHECK-NEXT: movq %rax, (%rcx)
|
|
|
|
; CHECK-NEXT: popq %rax
|
|
|
|
; CHECK-NEXT: retq
|
|
|
|
entry:
|
|
|
|
%call = call <1 x i64> @return_v1di() ; <<1 x i64>> [#uses=0]
|
|
|
|
store <1 x i64> %call, <1 x i64>* @g_v1di
|
|
|
|
ret void
|
2009-02-21 04:43:02 +08:00
|
|
|
}
|
|
|
|
|
2009-02-23 17:03:22 +08:00
|
|
|
declare <1 x i64> @return_v1di()
|
|
|
|
|
2009-02-22 16:05:12 +08:00
|
|
|
define <1 x i64> @t2() nounwind {
|
2013-07-14 14:24:09 +08:00
|
|
|
; CHECK-LABEL: t2:
|
2016-09-05 02:14:45 +08:00
|
|
|
; CHECK: ## BB#0:
|
|
|
|
; CHECK-NEXT: movl $1, %eax
|
|
|
|
; CHECK-NEXT: retq
|
|
|
|
ret <1 x i64> <i64 1>
|
2009-02-22 16:05:12 +08:00
|
|
|
}
|
|
|
|
|
2009-02-23 17:03:22 +08:00
|
|
|
define <2 x i32> @t3() nounwind {
|
2013-07-14 14:24:09 +08:00
|
|
|
; CHECK-LABEL: t3:
|
2016-09-05 02:14:45 +08:00
|
|
|
; CHECK: ## BB#0:
|
|
|
|
; CHECK-NEXT: movl $1, %eax
|
|
|
|
; CHECK-NEXT: movd %rax, %xmm0
|
|
|
|
; CHECK-NEXT: retq
|
|
|
|
ret <2 x i32> <i32 1, i32 0>
|
2009-02-23 17:03:22 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
define double @t4() nounwind {
|
2013-07-14 14:24:09 +08:00
|
|
|
; CHECK-LABEL: t4:
|
2016-09-05 02:14:45 +08:00
|
|
|
; CHECK: ## BB#0:
|
|
|
|
; CHECK-NEXT: movl $1, %eax
|
|
|
|
; CHECK-NEXT: movd %eax, %xmm0
|
|
|
|
; CHECK-NEXT: retq
|
|
|
|
ret double bitcast (<2 x i32> <i32 1, i32 0> to double)
|
2009-02-23 17:03:22 +08:00
|
|
|
}
|
|
|
|
|