• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1; RUN: llc < %s -o /dev/null -stats 2>&1 | FileCheck %s -check-prefix=STATS
2; Radar 10266272
3target datalayout = "e-p:32:32:32-i1:8:32-i8:8:32-i16:16:32-i32:32:32-i64:32:64-f32:32:32-f64:32:64-v64:32:64-v128:32:128-a0:0:32-n32-S32"
4target triple = "thumbv7-apple-ios4.0.0"
5; STATS-NOT: machine-sink
6
7define i32 @foo(i32 %h) nounwind readonly ssp {
8entry:
9  br label %for.cond
10
11for.cond:                                         ; preds = %for.body, %entry
12  %cmp = icmp slt i32 0, %h
13  br i1 %cmp, label %for.body, label %if.end299
14
15for.body:                                         ; preds = %for.cond
16  %v.5 = select i1 undef, i32 undef, i32 0
17  %0 = load i8* undef, align 1, !tbaa !0
18  %conv88 = zext i8 %0 to i32
19  %sub89 = sub nsw i32 0, %conv88
20  %v.8 = select i1 undef, i32 undef, i32 %sub89
21  %1 = load i8* null, align 1, !tbaa !0
22  %conv108 = zext i8 %1 to i32
23  %2 = load i8* undef, align 1, !tbaa !0
24  %conv110 = zext i8 %2 to i32
25  %sub111 = sub nsw i32 %conv108, %conv110
26  %cmp112 = icmp slt i32 %sub111, 0
27  %sub115 = sub nsw i32 0, %sub111
28  %v.10 = select i1 %cmp112, i32 %sub115, i32 %sub111
29  %add62 = add i32 0, %v.5
30  %add73 = add i32 %add62, 0
31  %add84 = add i32 %add73, 0
32  %add95 = add i32 %add84, %v.8
33  %add106 = add i32 %add95, 0
34  %add117 = add i32 %add106, %v.10
35  %add128 = add i32 %add117, 0
36  %add139 = add i32 %add128, 0
37  %add150 = add i32 %add139, 0
38  %add161 = add i32 %add150, 0
39  %add172 = add i32 %add161, 0
40  br i1 undef, label %for.cond, label %if.end299
41
42if.end299:                                        ; preds = %for.body, %for.cond
43  %s.10 = phi i32 [ %add172, %for.body ], [ 0, %for.cond ]
44  ret i32 %s.10
45}
46
47!0 = metadata !{metadata !"omnipotent char", metadata !1}
48!1 = metadata !{metadata !"Simple C/C++ TBAA", null}
49