1*f4a2713aSLionel Sambuc; RUN: llc -march=x86-64 -mcpu=generic -mtriple=x86_64-unknown-linux-gnu -relocation-model=static -asm-verbose=false < %s | FileCheck %s 2*f4a2713aSLionel Sambuc; RUN: llc -march=x86-64 -mcpu=atom -mtriple=x86_64-unknown-linux-gnu -relocation-model=static -asm-verbose=false < %s | FileCheck -check-prefix=ATOM %s 3*f4a2713aSLionel Sambuc 4*f4a2713aSLionel Sambuc; CHECK: xorl %eax, %eax 5*f4a2713aSLionel Sambuc; CHECK: movsd .LCPI0_0(%rip), %xmm0 6*f4a2713aSLionel Sambuc; CHECK: align 7*f4a2713aSLionel Sambuc; CHECK-NEXT: BB0_2: 8*f4a2713aSLionel Sambuc; CHECK-NEXT: movsd A(,%rax,8) 9*f4a2713aSLionel Sambuc; CHECK-NEXT: mulsd 10*f4a2713aSLionel Sambuc; CHECK-NEXT: movsd 11*f4a2713aSLionel Sambuc; CHECK-NEXT: incq %rax 12*f4a2713aSLionel Sambuc 13*f4a2713aSLionel Sambuc 14*f4a2713aSLionel Sambuc; ATOM: xorl %eax, %eax 15*f4a2713aSLionel Sambuc; ATOM: movsd .LCPI0_0(%rip), %xmm0 16*f4a2713aSLionel Sambuc; ATOM: align 17*f4a2713aSLionel Sambuc; ATOM-NEXT: BB0_2: 18*f4a2713aSLionel Sambuc; ATOM-NEXT: movsd A(,%rax,8) 19*f4a2713aSLionel Sambuc; ATOM-NEXT: mulsd 20*f4a2713aSLionel Sambuc; ATOM-NEXT: movsd 21*f4a2713aSLionel Sambuc; ATOM-NEXT: leaq 1(%rax), %rax 22*f4a2713aSLionel Sambuc 23*f4a2713aSLionel Sambuc@A = external global [0 x double] 24*f4a2713aSLionel Sambuc 25*f4a2713aSLionel Sambucdefine void @foo(i64 %n) nounwind { 26*f4a2713aSLionel Sambucentry: 27*f4a2713aSLionel Sambuc %cmp5 = icmp sgt i64 %n, 0 28*f4a2713aSLionel Sambuc br i1 %cmp5, label %for.body, label %for.end 29*f4a2713aSLionel Sambuc 30*f4a2713aSLionel Sambucfor.body: 31*f4a2713aSLionel Sambuc %i.06 = phi i64 [ %inc, %for.body ], [ 0, %entry ] 32*f4a2713aSLionel Sambuc %arrayidx = getelementptr [0 x double]* @A, i64 0, i64 %i.06 33*f4a2713aSLionel Sambuc %tmp3 = load double* %arrayidx, align 8 34*f4a2713aSLionel Sambuc %mul = fmul double %tmp3, 2.300000e+00 35*f4a2713aSLionel Sambuc store double %mul, double* %arrayidx, align 8 36*f4a2713aSLionel Sambuc %inc = add nsw i64 %i.06, 1 37*f4a2713aSLionel Sambuc %exitcond = icmp eq i64 %inc, %n 38*f4a2713aSLionel Sambuc br i1 %exitcond, label %for.end, label %for.body 39*f4a2713aSLionel Sambuc 40*f4a2713aSLionel Sambucfor.end: 41*f4a2713aSLionel Sambuc ret void 42*f4a2713aSLionel Sambuc} 43