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 3 4 ; CHECK: xorl %eax, %eax 5 ; CHECK: movsd .LCPI0_0(%rip), %xmm0 6 ; CHECK: align 7 ; CHECK-NEXT: BB0_2: 8 ; CHECK-NEXT: movsd A(,%rax,8) 9 ; CHECK-NEXT: mulsd 10 ; CHECK-NEXT: movsd 11 ; CHECK-NEXT: incq %rax 12 13 14 ; ATOM: xorl %eax, %eax 15 ; ATOM: movsd .LCPI0_0(%rip), %xmm0 16 ; ATOM: align 17 ; ATOM-NEXT: BB0_2: 18 ; ATOM-NEXT: movsd A(,%rax,8) 19 ; ATOM-NEXT: mulsd 20 ; ATOM-NEXT: movsd 21 ; ATOM-NEXT: leaq 1(%rax), %rax 22 23 @A = external global [0 x double] 24 25 define void @foo(i64 %n) nounwind { 26 entry: 27 %cmp5 = icmp sgt i64 %n, 0 28 br i1 %cmp5, label %for.body, label %for.end 29 30 for.body: 31 %i.06 = phi i64 [ %inc, %for.body ], [ 0, %entry ] 32 %arrayidx = getelementptr [0 x double], [0 x double]* @A, i64 0, i64 %i.06 33 %tmp3 = load double, double* %arrayidx, align 8 34 %mul = fmul double %tmp3, 2.300000e+00 35 store double %mul, double* %arrayidx, align 8 36 %inc = add nsw i64 %i.06, 1 37 %exitcond = icmp eq i64 %inc, %n 38 br i1 %exitcond, label %for.end, label %for.body 39 40 for.end: 41 ret void 42 } 43