blob: c18bdabdb03a9ea99a66745ddcac54c12089aac4 [file] [log] [blame]
Hal Finkelb5f7b0f2013-07-01 19:34:59 +00001; RUN: llc -mcpu=ppc32 < %s
2target datalayout = "E-p:32:32:32-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-v128:128:128-n32"
3target triple = "powerpc-unknown-linux-gnu"
4
5define void @fn1() {
6entry:
7 br i1 undef, label %for.end, label %for.body
8
9for.body: ; preds = %for.body, %entry
10 %inc3 = phi i64 [ %inc, %for.body ], [ undef, %entry ]
11 %inc = add nsw i64 %inc3, 1
12 %tobool = icmp eq i64 %inc, 0
13 br i1 %tobool, label %for.end, label %for.body
14
15for.end: ; preds = %for.body, %entry
16 ret void
17}
18
19; On PPC32, CTR is also 32 bits, and so cannot hold a 64-bit count.
20; CHECK: @fn1
21; CHECK-NOT: mtctr
22; CHECK: blr
23