1 ; RUN: llc -march=x86-64 -mcpu=generic -mtriple=x86_64-unknown-linux-gnu -relocation-model=static -asm-verbose=false < %s | FileCheck %s
2 ; 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
4 ; CHECK: xorl %eax, %eax
5 ; CHECK: movsd .LCPI0_0(%rip), %xmm0
8 ; CHECK-NEXT: movsd A(,%rax,8)
11 ; CHECK-NEXT: incq %rax
13 ; ATOM: movsd .LCPI0_0(%rip), %xmm0
14 ; ATOM: xorl %eax, %eax
17 ; ATOM-NEXT: movsd A(,%rax,8)
20 ; ATOM-NEXT: leaq 1(%rax), %rax
22 @A = external global [0 x double]
24 define void @foo(i64 %n) nounwind {
26 %cmp5 = icmp sgt i64 %n, 0
27 br i1 %cmp5, label %for.body, label %for.end
30 %i.06 = phi i64 [ %inc, %for.body ], [ 0, %entry ]
31 %arrayidx = getelementptr [0 x double]* @A, i64 0, i64 %i.06
32 %tmp3 = load double* %arrayidx, align 8
33 %mul = fmul double %tmp3, 2.300000e+00
34 store double %mul, double* %arrayidx, align 8
35 %inc = add nsw i64 %i.06, 1
36 %exitcond = icmp eq i64 %inc, %n
37 br i1 %exitcond, label %for.end, label %for.body