~pali/+junk/llvm-toolchain-3.7

« back to all changes in this revision

Viewing changes to test/Transforms/IndVarSimplify/2011-10-27-lftrnull.ll

  • Committer: Package Import Robot
  • Author(s): Sylvestre Ledru
  • Date: 2015-07-15 17:51:08 UTC
  • Revision ID: package-import@ubuntu.com-20150715175108-l8mynwovkx4zx697
Tags: upstream-3.7~+rc2
ImportĀ upstreamĀ versionĀ 3.7~+rc2

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
; RUN: opt < %s -indvars -S | FileCheck %s
 
2
; rdar://10359193: assert "IndVar type must match IVInit type"
 
3
 
 
4
target 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"
 
5
target triple = "thumbv7-apple-darwin"
 
6
 
 
7
; CHECK-LABEL: @test(
 
8
; CHECK: if.end.i126:
 
9
; CHECK: %exitcond = icmp ne i8* %incdec.ptr.i, getelementptr (i8, i8* null, i32 undef)
 
10
define void @test() nounwind {
 
11
entry:
 
12
  br label %while.cond
 
13
 
 
14
while.cond:
 
15
  br i1 undef, label %while.end, label %while.body
 
16
 
 
17
while.body:                                       ; preds = %while.cond
 
18
  br i1 undef, label %if.then165, label %while.cond
 
19
 
 
20
if.then165:                                       ; preds = %while.body
 
21
  br i1 undef, label %while.cond, label %for.body.lr.ph.i81
 
22
 
 
23
for.body.lr.ph.i81:                               ; preds = %if.then165
 
24
  br label %for.body.i86
 
25
 
 
26
for.body.i86:                                     ; preds = %for.end.i129, %for.body.lr.ph.i81
 
27
  %cmp196.i = icmp ult i32 0, undef
 
28
  br i1 %cmp196.i, label %for.body21.lr.ph.i, label %for.end.i129
 
29
 
 
30
for.body21.lr.ph.i:                               ; preds = %for.body.i86
 
31
  br label %for.body21.i
 
32
 
 
33
for.body21.i:
 
34
  %destYPixelPtr.010.i = phi i8* [ null, %for.body21.lr.ph.i ], [ %incdec.ptr.i, %if.end.i126 ]
 
35
  %x.09.i = phi i32 [ 0, %for.body21.lr.ph.i ], [ %inc.i125, %if.end.i126 ]
 
36
  br i1 undef, label %if.end.i126, label %if.else.i124
 
37
 
 
38
if.else.i124:                                     ; preds = %for.body21.i
 
39
  store i8 undef, i8* %destYPixelPtr.010.i, align 1
 
40
  br label %if.end.i126
 
41
 
 
42
if.end.i126:                                      ; preds = %if.else.i124, %for.body21.i
 
43
  %incdec.ptr.i = getelementptr inbounds i8, i8* %destYPixelPtr.010.i, i32 1
 
44
  %inc.i125 = add i32 %x.09.i, 1
 
45
  %cmp19.i = icmp ult i32 %inc.i125, undef
 
46
  br i1 %cmp19.i, label %for.body21.i, label %for.end.i129
 
47
 
 
48
for.end.i129:                                     ; preds = %if.end.i126, %for.body.i86
 
49
  br i1 undef, label %for.body.i86, label %while.cond
 
50
 
 
51
while.end:                                        ; preds = %while.cond
 
52
  br label %bail
 
53
 
 
54
bail:                                             ; preds = %while.end, %lor.lhs.false44, %lor.lhs.false41, %if.end29, %if.end
 
55
  unreachable
 
56
 
 
57
return:                                           ; preds = %lor.lhs.false20, %lor.lhs.false12, %lor.lhs.false, %entry
 
58
  ret void
 
59
}