1; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
2; RUN: llc -mtriple=i386-unknown-linux-gnu %s -o - | FileCheck %s
3
4@f = external dso_local local_unnamed_addr global i64*, align 4
5@a = external dso_local global i64, align 8
6
7define void @fn1() local_unnamed_addr {
8; CHECK-LABEL: fn1:
9; CHECK:       # %bb.0: # %entry
10; CHECK-NEXT:  .LBB0_1: # %if.end
11; CHECK-NEXT:    # =>This Inner Loop Header: Depth=1
12; CHECK-NEXT:    movl a+4, %eax
13; CHECK-NEXT:    orl a, %eax
14; CHECK-NEXT:    movl $a, f
15; CHECK-NEXT:    je .LBB0_3
16; CHECK-NEXT:  # %bb.2: # %if.end
17; CHECK-NEXT:    # in Loop: Header=BB0_1 Depth=1
18; CHECK-NEXT:    jne .LBB0_1
19; CHECK-NEXT:  .LBB0_3: # %cond.false
20entry:
21  br label %if.end
22
23if.end:                                           ; preds = %cond.end, %entry
24  br label %if.then7
25
26if.then7:                                         ; preds = %if.end
27  store i64* @a, i64** @f, align 4
28  %0 = load i64*, i64** @f, align 4
29  %1 = load i64, i64* %0, align 4
30  %tobool12 = icmp ne i64 %1, 0
31  %2 = load i64, i64* @a, align 8
32  %tobool13 = icmp ne i64 %2, 0
33  %3 = and i1 %tobool12, %tobool13
34  %tobool14.demorgan = and i1 %tobool12, %tobool13
35  br i1 %tobool14.demorgan, label %cond.end, label %cond.false
36
37cond.false:                                       ; preds = %if.then7
38  unreachable
39
40cond.end:                                         ; preds = %if.then7
41  %conv17 = sext i1 %3 to i8
42  br label %if.end
43}
44