1 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
2 ; RUN: llc < %s -mtriple=x86_64-- | FileCheck %s
4 define void @loop(i64 %n, ptr nocapture %d) nounwind {
6 ; CHECK: # %bb.0: # %entry
7 ; CHECK-NEXT: movq %rdi, %rax
8 ; CHECK-NEXT: shlq $4, %rax
9 ; CHECK-NEXT: addq %rsi, %rax
10 ; CHECK-NEXT: movsd {{.*#+}} xmm0 = [3.0E+0,0.0E+0]
11 ; CHECK-NEXT: .p2align 4, 0x90
12 ; CHECK-NEXT: .LBB0_1: # %bb
13 ; CHECK-NEXT: # =>This Inner Loop Header: Depth=1
14 ; CHECK-NEXT: movsd {{.*#+}} xmm1 = mem[0],zero
15 ; CHECK-NEXT: mulsd %xmm0, %xmm1
16 ; CHECK-NEXT: movsd %xmm1, (%rax)
17 ; CHECK-NEXT: addq $8, %rax
18 ; CHECK-NEXT: incq %rdi
19 ; CHECK-NEXT: jne .LBB0_1
20 ; CHECK-NEXT: # %bb.2: # %return
26 %indvar = phi i64 [ %n, %entry ], [ %indvar.next, %bb ]
27 %i.03 = add i64 %indvar, %n
28 %0 = getelementptr double, ptr %d, i64 %i.03
29 %1 = load double, ptr %0, align 8
30 %2 = fmul double %1, 3.000000e+00
31 store double %2, ptr %0, align 8
32 %indvar.next = add i64 %indvar, 1
33 %exitcond = icmp eq i64 %indvar.next, 0
34 br i1 %exitcond, label %return, label %bb