1 ; RUN: llc -O1 -mtriple=arm64-apple-ios7.0.0 -enable-andcmp-sinking=true < %s | FileCheck %s
2 ; ModuleID = 'and-cbz-extr-mr.bc'
3 target 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"
5 define zeroext i1 @foo(i1 %IsEditable, i1 %isTextField, ptr %str1, ptr %str2, ptr %str3, ptr %str4, ptr %str5, ptr %str6, ptr %str7, ptr %str8, ptr %str9, ptr %str10, ptr %str11, ptr %str12, ptr %str13, i32 %int1, ptr %str14) unnamed_addr #0 align 2 {
8 %tobool = icmp eq ptr %str14, null
9 br i1 %tobool, label %return, label %if.end
13 if.end: ; preds = %entry
14 %and.i.i.i = and i32 %int1, 4
15 %tobool.i.i.i = icmp eq i32 %and.i.i.i, 0
16 br i1 %tobool.i.i.i, label %if.end12, label %land.rhs.i, !prof !1
18 land.rhs.i: ; preds = %if.end
19 %cmp.i.i.i = icmp eq ptr %str12, %str13
20 br i1 %cmp.i.i.i, label %if.then3, label %lor.rhs.i.i.i
22 lor.rhs.i.i.i: ; preds = %land.rhs.i
23 %cmp.i13.i.i.i = icmp eq ptr %str10, %str11
24 br i1 %cmp.i13.i.i.i, label %_ZNK7WebCore4Node10hasTagNameERKNS_13QualifiedNameE.exit, label %if.end5
26 _ZNK7WebCore4Node10hasTagNameERKNS_13QualifiedNameE.exit: ; preds = %lor.rhs.i.i.i
27 %cmp.i.i.i.i = icmp eq ptr %str8, %str9
28 br i1 %cmp.i.i.i.i, label %if.then3, label %if.end5
30 if.then3: ; preds = %_ZNK7WebCore4Node10hasTagNameERKNS_13QualifiedNameE.exit, %land.rhs.i
31 %tmp11 = load i8, ptr %str14, align 8
32 %tmp12 = and i8 %tmp11, 2
33 %tmp13 = icmp ne i8 %tmp12, 0
36 if.end5: ; preds = %_ZNK7WebCore4Node10hasTagNameERKNS_13QualifiedNameE.exit, %lor.rhs.i.i.i
39 br i1 %tobool.i.i.i, label %if.end12, label %land.rhs.i19, !prof !1
41 land.rhs.i19: ; preds = %if.end5
42 %cmp.i.i.i18 = icmp eq ptr %str6, %str7
43 br i1 %cmp.i.i.i18, label %if.then7, label %lor.rhs.i.i.i23
45 lor.rhs.i.i.i23: ; preds = %land.rhs.i19
46 %cmp.i13.i.i.i22 = icmp eq ptr %str3, %str4
47 br i1 %cmp.i13.i.i.i22, label %_ZNK7WebCore4Node10hasTagNameERKNS_13QualifiedNameE.exit28, label %if.end12
49 _ZNK7WebCore4Node10hasTagNameERKNS_13QualifiedNameE.exit28: ; preds = %lor.rhs.i.i.i23
50 %cmp.i.i.i.i26 = icmp eq ptr %str1, %str2
51 br i1 %cmp.i.i.i.i26, label %if.then7, label %if.end12
53 if.then7: ; preds = %_ZNK7WebCore4Node10hasTagNameERKNS_13QualifiedNameE.exit28, %land.rhs.i19
54 br i1 %isTextField, label %if.then9, label %if.end12
56 if.then9: ; preds = %if.then7
57 %tmp23 = load i8, ptr %str5, align 8
58 %tmp24 = and i8 %tmp23, 2
59 %tmp25 = icmp ne i8 %tmp24, 0
62 if.end12: ; preds = %if.then7, %_ZNK7WebCore4Node10hasTagNameERKNS_13QualifiedNameE.exit28, %lor.rhs.i.i.i23, %if.end5, %if.end
63 %lnot = xor i1 %IsEditable, true
66 return: ; preds = %if.end12, %if.then9, %if.then3, %entry
67 %retval.0 = phi i1 [ %tmp13, %if.then3 ], [ %tmp25, %if.then9 ], [ %lnot, %if.end12 ], [ true, %entry ]
71 attributes #0 = { nounwind ssp }
72 !1 = !{!"branch_weights", i32 3, i32 5}