~ubuntu-branches/ubuntu/maverick/clamav/maverick-backports

« back to all changes in this revision

Viewing changes to libclamav/c++/llvm/test/CodeGen/Thumb2/thumb2-ifcvt1.ll

  • Committer: Bazaar Package Importer
  • Author(s): Stephen Gran, Stephen Gran, Michael Tautschnig
  • Date: 2010-04-26 21:41:18 UTC
  • mfrom: (2.1.6 squeeze)
  • Revision ID: james.westby@ubuntu.com-20100426214118-i6lo606wnh7ywfj6
Tags: 0.96+dfsg-4
[ Stephen Gran ]
* Fixed typo in clamav-milter's postinst

[ Michael Tautschnig ]
* Fixed typo in clamav-freshclam's postinst (closes: #579271)
* Debconf translation updates
  - Portuguese (closes: #579068)

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
; RUN: llc < %s -mtriple=thumbv7-apple-darwin | FileCheck %s
 
2
 
 
3
define i32 @t1(i32 %a, i32 %b, i32 %c, i32 %d) nounwind {
 
4
; CHECK: t1:
 
5
; CHECK: it ne
 
6
; CHECK: cmpne
 
7
        switch i32 %c, label %cond_next [
 
8
                 i32 1, label %cond_true
 
9
                 i32 7, label %cond_true
 
10
        ]
 
11
 
 
12
cond_true:
 
13
        %tmp12 = add i32 %a, 1
 
14
        %tmp1518 = add i32 %tmp12, %b
 
15
        ret i32 %tmp1518
 
16
 
 
17
cond_next:
 
18
        %tmp15 = add i32 %b, %a
 
19
        ret i32 %tmp15
 
20
}
 
21
 
 
22
; FIXME: Check for # of unconditional branch after adding branch folding post ifcvt.
 
23
define i32 @t2(i32 %a, i32 %b) nounwind {
 
24
entry:
 
25
; CHECK: t2:
 
26
; CHECK: ite gt
 
27
; CHECK: subgt
 
28
; CHECK: suble
 
29
        %tmp1434 = icmp eq i32 %a, %b           ; <i1> [#uses=1]
 
30
        br i1 %tmp1434, label %bb17, label %bb.outer
 
31
 
 
32
bb.outer:               ; preds = %cond_false, %entry
 
33
        %b_addr.021.0.ph = phi i32 [ %b, %entry ], [ %tmp10, %cond_false ]              ; <i32> [#uses=5]
 
34
        %a_addr.026.0.ph = phi i32 [ %a, %entry ], [ %a_addr.026.0, %cond_false ]               ; <i32> [#uses=1]
 
35
        br label %bb
 
36
 
 
37
bb:             ; preds = %cond_true, %bb.outer
 
38
        %indvar = phi i32 [ 0, %bb.outer ], [ %indvar.next, %cond_true ]                ; <i32> [#uses=2]
 
39
        %tmp. = sub i32 0, %b_addr.021.0.ph             ; <i32> [#uses=1]
 
40
        %tmp.40 = mul i32 %indvar, %tmp.                ; <i32> [#uses=1]
 
41
        %a_addr.026.0 = add i32 %tmp.40, %a_addr.026.0.ph               ; <i32> [#uses=6]
 
42
        %tmp3 = icmp sgt i32 %a_addr.026.0, %b_addr.021.0.ph            ; <i1> [#uses=1]
 
43
        br i1 %tmp3, label %cond_true, label %cond_false
 
44
 
 
45
cond_true:              ; preds = %bb
 
46
        %tmp7 = sub i32 %a_addr.026.0, %b_addr.021.0.ph         ; <i32> [#uses=2]
 
47
        %tmp1437 = icmp eq i32 %tmp7, %b_addr.021.0.ph          ; <i1> [#uses=1]
 
48
        %indvar.next = add i32 %indvar, 1               ; <i32> [#uses=1]
 
49
        br i1 %tmp1437, label %bb17, label %bb
 
50
 
 
51
cond_false:             ; preds = %bb
 
52
        %tmp10 = sub i32 %b_addr.021.0.ph, %a_addr.026.0                ; <i32> [#uses=2]
 
53
        %tmp14 = icmp eq i32 %a_addr.026.0, %tmp10              ; <i1> [#uses=1]
 
54
        br i1 %tmp14, label %bb17, label %bb.outer
 
55
 
 
56
bb17:           ; preds = %cond_false, %cond_true, %entry
 
57
        %a_addr.026.1 = phi i32 [ %a, %entry ], [ %tmp7, %cond_true ], [ %a_addr.026.0, %cond_false ]           ; <i32> [#uses=1]
 
58
        ret i32 %a_addr.026.1
 
59
}
 
60
 
 
61
@x = external global i32*               ; <i32**> [#uses=1]
 
62
 
 
63
define void @foo(i32 %a) nounwind {
 
64
entry:
 
65
        %tmp = load i32** @x            ; <i32*> [#uses=1]
 
66
        store i32 %a, i32* %tmp
 
67
        ret void
 
68
}
 
69
 
 
70
define void @t3(i32 %a, i32 %b) nounwind {
 
71
entry:
 
72
; CHECK: t3:
 
73
; CHECK: it lt
 
74
; CHECK: poplt {r7, pc}
 
75
        %tmp1 = icmp sgt i32 %a, 10             ; <i1> [#uses=1]
 
76
        br i1 %tmp1, label %cond_true, label %UnifiedReturnBlock
 
77
 
 
78
cond_true:              ; preds = %entry
 
79
        tail call void @foo( i32 %b )
 
80
        ret void
 
81
 
 
82
UnifiedReturnBlock:             ; preds = %entry
 
83
        ret void
 
84
}