2009-12-22 17:47:23 +00:00
|
|
|
; RUN: llc < %s -march=x86-64 -mattr=+sse2 | FileCheck %s
|
2009-12-18 07:40:29 +00:00
|
|
|
|
|
|
|
define double @t1(float* nocapture %x) nounwind readonly ssp {
|
|
|
|
entry:
|
2009-12-22 17:47:23 +00:00
|
|
|
; CHECK: t1:
|
|
|
|
; CHECK: movss (%rdi), %xmm0
|
|
|
|
; CHECK; cvtss2sd %xmm0, %xmm0
|
2009-12-18 07:40:29 +00:00
|
|
|
|
|
|
|
%0 = load float* %x, align 4
|
|
|
|
%1 = fpext float %0 to double
|
|
|
|
ret double %1
|
|
|
|
}
|
|
|
|
|
2009-12-22 17:47:23 +00:00
|
|
|
define float @t2(double* nocapture %x) nounwind readonly ssp optsize {
|
2009-12-18 07:40:29 +00:00
|
|
|
entry:
|
2009-12-22 17:47:23 +00:00
|
|
|
; CHECK: t2:
|
|
|
|
; CHECK; cvtsd2ss (%rdi), %xmm0
|
2009-12-18 07:40:29 +00:00
|
|
|
%0 = load double* %x, align 8
|
|
|
|
%1 = fptrunc double %0 to float
|
|
|
|
ret float %1
|
|
|
|
}
|