blob: 5389c13184455e4e94c5f25a47ddac9094cb2f1a [file] [log] [blame]
Hal Finkel940ab932014-02-28 00:27:01 +00001; RUN: llc < %s -mcpu=ppc64 -mattr=-crbits | FileCheck %s
Hal Finkel94a6f382013-12-11 23:12:25 +00002target 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-f128:128:128-v128:128:128-n32:64"
3target triple = "powerpc64-unknown-linux-gnu"
4
5; Function Attrs: nounwind
6define zeroext i1 @test1() unnamed_addr #0 align 2 {
7
8; CHECK-LABEL: @test1
9
10entry:
11 br i1 undef, label %lor.end, label %lor.rhs
12
13lor.rhs: ; preds = %entry
14 unreachable
15
16lor.end: ; preds = %entry
17 br i1 undef, label %land.rhs, label %if.then
18
19if.then: ; preds = %lor.end
20 br i1 undef, label %return, label %if.end.i24
21
22if.end.i24: ; preds = %if.then
David Blaikiea79ac142015-02-27 21:17:42 +000023 %0 = load i32, i32* undef, align 4
Hal Finkel94a6f382013-12-11 23:12:25 +000024 %lnot.i.i16.i23 = icmp eq i32 %0, 0
25 br i1 %lnot.i.i16.i23, label %if.end7.i37, label %test.exit27.i34
26
27test.exit27.i34: ; preds = %if.end.i24
28 br i1 undef, label %return, label %if.end7.i37
29
30if.end7.i37: ; preds = %test.exit27.i34, %if.end.i24
31 %tobool.i.i36 = icmp eq i8 undef, 0
32 br i1 %tobool.i.i36, label %return, label %if.then9.i39
33
34if.then9.i39: ; preds = %if.end7.i37
35 br i1 %lnot.i.i16.i23, label %return, label %lor.rhs.i.i49
36
37; CHECK: .LBB0_7:
Chandler Carruth9a0051c2014-07-23 07:08:53 +000038; CHECK: bne 1, .LBB0_10
Hal Finkel94a6f382013-12-11 23:12:25 +000039; CHECK: beq 0, .LBB0_10
40; CHECK: .LBB0_9:
41
42lor.rhs.i.i49: ; preds = %if.then9.i39
43 %cmp.i.i.i.i48 = icmp ne i64 undef, 0
44 br label %return
45
46land.rhs: ; preds = %lor.end
47 br i1 undef, label %return, label %if.end.i
48
49if.end.i: ; preds = %land.rhs
50 br i1 undef, label %return, label %if.then9.i
51
52if.then9.i: ; preds = %if.end.i
53 br i1 undef, label %return, label %lor.rhs.i.i
54
55lor.rhs.i.i: ; preds = %if.then9.i
56 %cmp.i.i.i.i = icmp ne i64 undef, 0
57 br label %return
58
59return: ; preds = %lor.rhs.i.i, %if.then9.i, %if.end.i, %land.rhs, %lor.rhs.i.i49, %if.then9.i39, %if.end7.i37, %test.exit27.i34, %if.then
60 %retval.0 = phi i1 [ false, %if.then ], [ false, %test.exit27.i34 ], [ true, %if.end7.i37 ], [ true, %if.then9.i39 ], [ %cmp.i.i.i.i48, %lor.rhs.i.i49 ], [ false, %land.rhs ], [ true, %if.end.i ], [ true, %if.then9.i ], [ %cmp.i.i.i.i, %lor.rhs.i.i ]
61 ret i1 %retval.0
62}
63
64attributes #0 = { nounwind }
65