1 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
2 ; RUN: llc -mcpu=pwr9 -mtriple=powerpc64le-unknown-unknown \
3 ; RUN: -ppc-asm-full-reg-names -verify-machineinstrs -O3 < %s | FileCheck %s \
4 ; RUN: --check-prefix=CHECK-P9
6 %class.A = type <{ %"class.D", %"class.D", i32, i32, i32, %"class.B", %"class.C", %"class.C", %"class.C", %"class.C", %"class.D", [2 x i8], %"class.E", %"class.F", %"class.G", %"class.G", %"class.H", i32, [4 x i8] }>
7 %"class.B" = type { [441 x i32] }
8 %"class.C" = type { [442 x i16] }
9 %"class.D" = type { [441 x i16] }
10 %"class.E" = type { [4 x i32] }
11 %"class.F" = type { [8 x i32] }
12 %"class.G" = type { [2 x i32] }
13 %"class.H" = type { %"struct.A" }
14 %"struct.A" = type { %"struct.B" }
15 %"struct.B" = type { i32*, i32*, i32* }
17 define dso_local i1 @t(%class.A* %this, i32 %color, i32 %vertex) local_unnamed_addr {
19 ; CHECK-P9: # %bb.0: # %entry
20 ; CHECK-P9-NEXT: li r5, 1
21 ; CHECK-P9-NEXT: bc 12, 4*cr5+lt, .LBB0_4
22 ; CHECK-P9-NEXT: # %bb.1: # %land.lhs.true
23 ; CHECK-P9-NEXT: bc 12, 4*cr5+lt, .LBB0_5
24 ; CHECK-P9-NEXT: .LBB0_2: # %for.inc
25 ; CHECK-P9-NEXT: lhz r3, 5308(r3)
26 ; CHECK-P9-NEXT: cmplwi r3, 2
27 ; CHECK-P9-NEXT: bge- cr0, .LBB0_6
28 ; CHECK-P9-NEXT: # %bb.3: # %land.lhs.true.1
29 ; CHECK-P9-NEXT: li r5, 0
30 ; CHECK-P9-NEXT: mr r3, r5
32 ; CHECK-P9-NEXT: .LBB0_4: # %lor.lhs.false
33 ; CHECK-P9-NEXT: cmplwi cr0, r4, 0
34 ; CHECK-P9-NEXT: bne cr0, .LBB0_2
35 ; CHECK-P9-NEXT: .LBB0_5: # %cleanup16
36 ; CHECK-P9-NEXT: mr r3, r5
38 ; CHECK-P9-NEXT: .LBB0_6: # %lor.lhs.false.1
40 br i1 undef, label %land.lhs.true, label %lor.lhs.false
42 land.lhs.true: ; preds = %entry
43 br i1 undef, label %cleanup16, label %for.inc
45 lor.lhs.false: ; preds = %entry
46 %cmp11 = icmp ne i16 0, 2
47 %cmp13 = icmp eq i32 0, %color
48 %or.cond = and i1 %cmp13, %cmp11
49 br i1 %or.cond, label %cleanup16, label %for.inc
51 for.inc: ; preds = %lor.lhs.false, %land.lhs.true
52 %arrayidx.i31.1 = getelementptr inbounds %class.A, %class.A* %this, i64 0, i32 8, i32 0, i64 undef
53 %0 = load i16, i16* %arrayidx.i31.1, align 2
54 %cmp8.1 = icmp ult i16 %0, 2
55 br i1 %cmp8.1, label %land.lhs.true.1, label %lor.lhs.false.1
57 cleanup16: ; preds = %for.inc.2, %lor.lhs.false.2, %lor.lhs.false, %land.lhs.true
58 %1 = phi i1 [ true, %land.lhs.true ], [ true, %lor.lhs.false ], [ true, %lor.lhs.false.2 ], [ false, %for.inc.2 ]
61 lor.lhs.false.1: ; preds = %for.inc
64 land.lhs.true.1: ; preds = %for.inc
65 br label %lor.lhs.false.2
67 lor.lhs.false.2: ; preds = %land.lhs.true.1
68 br i1 false, label %cleanup16, label %for.inc.2
70 for.inc.2: ; preds = %lor.lhs.false.2