source: icGREP/icgrep-devel/llvm-3.8.0.src/test/CodeGen/AArch64/arm64-andCmpBrToTBZ.ll @ 5027

Last change on this file since 5027 was 5027, checked in by cameron, 3 years ago

Upgrade to llvm 3.8

File size: 3.3 KB
Line 
1; RUN: llc -O1 -march=arm64 -enable-andcmp-sinking=true < %s | FileCheck %s
2; ModuleID = 'and-cbz-extr-mr.bc'
3target datalayout = "e-p:64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-v64:64:64-v128:128:128-a0:0:64-n32:64-S128"
4target triple = "arm64-apple-ios7.0.0"
5
6define zeroext i1 @foo(i1 %IsEditable, i1 %isTextField, i8* %str1, i8* %str2, i8* %str3, i8* %str4, i8* %str5, i8* %str6, i8* %str7, i8* %str8, i8* %str9, i8* %str10, i8* %str11, i8* %str12, i8* %str13, i32 %int1, i8* %str14) unnamed_addr #0 align 2 {
7; CHECK: _foo:
8entry:
9  %tobool = icmp eq i8* %str14, null
10  br i1 %tobool, label %return, label %if.end
11
12; CHECK: %if.end
13; CHECK: tbz
14if.end:                                           ; preds = %entry
15  %and.i.i.i = and i32 %int1, 4
16  %tobool.i.i.i = icmp eq i32 %and.i.i.i, 0
17  br i1 %tobool.i.i.i, label %if.end12, label %land.rhs.i
18
19land.rhs.i:                                       ; preds = %if.end
20  %cmp.i.i.i = icmp eq i8* %str12, %str13
21  br i1 %cmp.i.i.i, label %if.then3, label %lor.rhs.i.i.i
22
23lor.rhs.i.i.i:                                    ; preds = %land.rhs.i
24  %cmp.i13.i.i.i = icmp eq i8* %str10, %str11
25  br i1 %cmp.i13.i.i.i, label %_ZNK7WebCore4Node10hasTagNameERKNS_13QualifiedNameE.exit, label %if.end5
26
27_ZNK7WebCore4Node10hasTagNameERKNS_13QualifiedNameE.exit: ; preds = %lor.rhs.i.i.i
28  %cmp.i.i.i.i = icmp eq i8* %str8, %str9
29  br i1 %cmp.i.i.i.i, label %if.then3, label %if.end5
30
31if.then3:                                         ; preds = %_ZNK7WebCore4Node10hasTagNameERKNS_13QualifiedNameE.exit, %land.rhs.i
32  %tmp11 = load i8, i8* %str14, align 8
33  %tmp12 = and i8 %tmp11, 2
34  %tmp13 = icmp ne i8 %tmp12, 0
35  br label %return
36
37if.end5:                                          ; preds = %_ZNK7WebCore4Node10hasTagNameERKNS_13QualifiedNameE.exit, %lor.rhs.i.i.i
38; CHECK: %if.end5
39; CHECK: tbz
40  br i1 %tobool.i.i.i, label %if.end12, label %land.rhs.i19
41
42land.rhs.i19:                                     ; preds = %if.end5
43  %cmp.i.i.i18 = icmp eq i8* %str6, %str7
44  br i1 %cmp.i.i.i18, label %if.then7, label %lor.rhs.i.i.i23
45
46lor.rhs.i.i.i23:                                  ; preds = %land.rhs.i19
47  %cmp.i13.i.i.i22 = icmp eq i8* %str3, %str4
48  br i1 %cmp.i13.i.i.i22, label %_ZNK7WebCore4Node10hasTagNameERKNS_13QualifiedNameE.exit28, label %if.end12
49
50_ZNK7WebCore4Node10hasTagNameERKNS_13QualifiedNameE.exit28: ; preds = %lor.rhs.i.i.i23
51  %cmp.i.i.i.i26 = icmp eq i8* %str1, %str2
52  br i1 %cmp.i.i.i.i26, label %if.then7, label %if.end12
53
54if.then7:                                         ; preds = %_ZNK7WebCore4Node10hasTagNameERKNS_13QualifiedNameE.exit28, %land.rhs.i19
55  br i1 %isTextField, label %if.then9, label %if.end12
56
57if.then9:                                         ; preds = %if.then7
58  %tmp23 = load i8, i8* %str5, align 8
59  %tmp24 = and i8 %tmp23, 2
60  %tmp25 = icmp ne i8 %tmp24, 0
61  br label %return
62
63if.end12:                                         ; preds = %if.then7, %_ZNK7WebCore4Node10hasTagNameERKNS_13QualifiedNameE.exit28, %lor.rhs.i.i.i23, %if.end5, %if.end
64  %lnot = xor i1 %IsEditable, true
65  br label %return
66
67return:                                           ; preds = %if.end12, %if.then9, %if.then3, %entry
68  %retval.0 = phi i1 [ %tmp13, %if.then3 ], [ %tmp25, %if.then9 ], [ %lnot, %if.end12 ], [ true, %entry ]
69  ret i1 %retval.0
70}
71
72attributes #0 = { nounwind ssp }
Note: See TracBrowser for help on using the repository browser.