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