• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1; RUN: llc -mcpu=ppc32 < %s | FileCheck %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
24