~ubuntu-branches/ubuntu/trusty/llvm-toolchain-snapshot/trusty-201310232150

« back to all changes in this revision

Viewing changes to test/CodeGen/ARM/2013-05-05-IfConvertBug.ll

  • Committer: Package Import Robot
  • Author(s): Sylvestre Ledru
  • Date: 2013-05-27 15:01:57 UTC
  • mfrom: (0.10.1) (0.9.1) (0.8.1) (0.7.1) (0.6.1) (0.5.2)
  • Revision ID: package-import@ubuntu.com-20130527150157-tdkrsjpuvht7v0qx
Tags: 1:3.4~svn182733-1~exp1
* New snapshot release (3.4 release)
* Add a symlink of libLLVM-3.4.so.1 to usr/lib/llvm-3.4/lib/libLLVM-3.4.so
    to fix make the llvm-config-3.4 --libdir work (Closes: #708677)
  * Various packages rename to allow co installations:
    * libclang1 => libclang1-3.4
    * libclang1-dbg => libclang1-3.4-dbg
    * libclang-dev => libclang-3.4-dev
    * libclang-common-dev => libclang-common-3.4-dev

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
; RUN: llc < %s -mtriple=thumbv7-apple-ios -mcpu=cortex-a8 | FileCheck %s
 
2
; rdar://13782395
 
3
 
 
4
define i32 @t1(i32 %a, i32 %b, i8** %retaddr) {
 
5
; CHECK: t1:
 
6
; CHECK: Block address taken
 
7
; CHECK-NOT: Address of block that was removed by CodeGen
 
8
  store i8* blockaddress(@t1, %cond_true), i8** %retaddr
 
9
  %tmp2 = icmp eq i32 %a, 0
 
10
  br i1 %tmp2, label %cond_false, label %cond_true
 
11
 
 
12
cond_true:
 
13
  %tmp5 = add i32 %b, 1
 
14
  ret i32 %tmp5
 
15
 
 
16
cond_false:
 
17
  %tmp7 = add i32 %b, -1
 
18
  ret i32 %tmp7
 
19
}
 
20
 
 
21
define i32 @t2(i32 %a, i32 %b, i32 %c, i32 %d, i8** %retaddr) {
 
22
; CHECK: t2:
 
23
; CHECK: Block address taken
 
24
; CHECK: %cond_true
 
25
; CHECK: add
 
26
; CHECK: bx lr
 
27
  store i8* blockaddress(@t2, %cond_true), i8** %retaddr
 
28
  %tmp2 = icmp sgt i32 %c, 10
 
29
  %tmp5 = icmp slt i32 %d, 4
 
30
  %tmp8 = and i1 %tmp5, %tmp2
 
31
  %tmp13 = add i32 %b, %a
 
32
  br i1 %tmp8, label %cond_true, label %UnifiedReturnBlock
 
33
 
 
34
cond_true:
 
35
  %tmp15 = add i32 %tmp13, %c
 
36
  %tmp1821 = sub i32 %tmp15, %d
 
37
  ret i32 %tmp1821
 
38
 
 
39
UnifiedReturnBlock:
 
40
  ret i32 %tmp13
 
41
}
 
42
 
 
43
define hidden fastcc void @t3(i8** %retaddr) {
 
44
; CHECK: t3:
 
45
; CHECK: Block address taken
 
46
; CHECK-NOT: Address of block that was removed by CodeGen
 
47
bb:
 
48
  store i8* blockaddress(@t3, %KBBlockZero_return_1), i8** %retaddr
 
49
  br i1 undef, label %bb77, label %bb7.i
 
50
 
 
51
bb7.i:                                            ; preds = %bb35
 
52
  br label %bb2.i
 
53
 
 
54
KBBlockZero_return_1:                             ; preds = %KBBlockZero.exit
 
55
  unreachable
 
56
 
 
57
KBBlockZero_return_0:                             ; preds = %KBBlockZero.exit
 
58
  unreachable
 
59
 
 
60
bb77:                                             ; preds = %bb26, %bb12, %bb
 
61
  ret void
 
62
 
 
63
bb2.i:                                            ; preds = %bb6.i350, %bb7.i
 
64
  br i1 undef, label %bb6.i350, label %KBBlockZero.exit
 
65
 
 
66
bb6.i350:                                         ; preds = %bb2.i
 
67
  br label %bb2.i
 
68
 
 
69
KBBlockZero.exit:                                 ; preds = %bb2.i
 
70
  indirectbr i8* undef, [label %KBBlockZero_return_1, label %KBBlockZero_return_0]
 
71
}