On recent Intel u-arch's, folding loads into some unary SSE instructions can
[oota-llvm.git] / test / CodeGen / X86 / break-sse-dep.ll
1 ; RUN: llc < %s -march=x86-64 -mattr=+sse2,+break-sse-dep | FileCheck %s --check-prefix=YES
2 ; RUN: llc < %s -march=x86-64 -mattr=+sse2,-break-sse-dep | FileCheck %s --check-prefix=NO
3
4 define double @t1(float* nocapture %x) nounwind readonly ssp {
5 entry:
6 ; YES: t1:
7 ; YES: movss (%rdi), %xmm0
8 ; YES; cvtss2sd %xmm0, %xmm0
9
10 ; NO: t1:
11 ; NO; cvtss2sd (%rdi), %xmm0
12   %0 = load float* %x, align 4
13   %1 = fpext float %0 to double
14   ret double %1
15 }
16
17 define float @t2(double* nocapture %x) nounwind readonly ssp {
18 entry:
19 ; YES: t2:
20 ; YES: movsd (%rdi), %xmm0
21 ; YES; cvtsd2ss %xmm0, %xmm0
22
23 ; NO: t2:
24 ; NO; cvtsd2ss (%rdi), %xmm0
25   %0 = load double* %x, align 8
26   %1 = fptrunc double %0 to float
27   ret float %1
28 }