1 ; RUN: llc < %s -march=x86-64 -mattr=+avx | FileCheck %s
3 ; rdar:15221834 False AVX register dependencies cause 5x slowdown on
4 ; flops-6. Make sure the unused register read by vcvtsi2sdq is zeroed
5 ; to avoid cyclic dependence on a write to the same register in a
10 ; CHECK: vxorps %[[REG:xmm.]], %{{xmm.}}, %{{xmm.}}
11 ; CHECK: vcvtsi2sdq %{{r[0-9a-x]+}}, %[[REG]], %{{xmm.}}
12 define i64 @t1(i64* nocapture %x, double* nocapture %y) nounwind {
17 %i = phi i64 [ 1, %entry ], [ %inc, %loop ]
18 %s1 = phi i64 [ %vx, %entry ], [ %s2, %loop ]
19 %fi = sitofp i64 %i to double
21 %fipy = fadd double %fi, %vy
22 %iipy = fptosi double %fipy to i64
23 %s2 = add i64 %s1, %iipy
24 %inc = add nsw i64 %i, 1
25 %exitcond = icmp eq i64 %inc, 156250000
26 br i1 %exitcond, label %ret, label %loop