blob: 85e3bf251133f1456395fd299efea9cb0c2e8ad4 [file] [log] [blame]
Dan Gohman4bfcf2a2009-03-05 19:32:48 +00001; RUN: llvm-as < %s | llc -march=x86 > %t
2; RUN: grep dec %t | count 1
3; RUN: not grep test %t
4; RUN: not grep cmp %t
5
6define void @foo(i32 %n, double* nocapture %p) nounwind {
7 br label %bb
8
9bb:
10 %indvar = phi i32 [ 0, %0 ], [ %indvar.next, %bb ]
11 %i.03 = sub i32 %n, %indvar
12 %1 = getelementptr double* %p, i32 %i.03
13 %2 = load double* %1, align 4
Dan Gohmanae3a0be2009-06-04 22:49:04 +000014 %3 = fmul double %2, 2.930000e+00
Dan Gohman4bfcf2a2009-03-05 19:32:48 +000015 store double %3, double* %1, align 4
16 %4 = add i32 %i.03, -1
17 %phitmp = icmp slt i32 %4, 0
18 %indvar.next = add i32 %indvar, 1
19 br i1 %phitmp, label %bb, label %return
20
21return:
22 ret void
23}