| 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 |
| 5 |
|
| 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 { ptr, ptr, ptr } |
| 16 |
|
| 17 |
define dso_local i1 @t(ptr %this, i32 %color, i32 %vertex) local_unnamed_addr { |
| 18 |
; CHECK-P9-LABEL: t: |
| 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 r3, 0 |
| 30 |
; CHECK-P9-NEXT: blr |
| 31 |
; CHECK-P9-NEXT: .LBB0_4: # %lor.lhs.false |
| 32 |
; CHECK-P9-NEXT: cmplwi r4, 0 |
| 33 |
; CHECK-P9-NEXT: bne cr0, .LBB0_2 |
| 34 |
; CHECK-P9-NEXT: .LBB0_5: # %cleanup16 |
| 35 |
; CHECK-P9-NEXT: mr r3, r5 |
| 36 |
; CHECK-P9-NEXT: blr |
| 37 |
; CHECK-P9-NEXT: .LBB0_6: # %lor.lhs.false.1 |
| 38 |
entry: |
| 39 |
br i1 undef, label %land.lhs.true, label %lor.lhs.false |
| 40 |
|
| 41 |
land.lhs.true: ; preds = %entry |
| 42 |
br i1 undef, label %cleanup16, label %for.inc |
| 43 |
|
| 44 |
lor.lhs.false: ; preds = %entry |
| 45 |
%cmp11 = icmp ne i16 0, 2 |
| 46 |
%cmp13 = icmp eq i32 0, %color |
| 47 |
%or.cond = and i1 %cmp13, %cmp11 |
| 48 |
br i1 %or.cond, label %cleanup16, label %for.inc |
| 49 |
|
| 50 |
for.inc: ; preds = %lor.lhs.false, %land.lhs.true |
| 51 |
%arrayidx.i31.1 = getelementptr inbounds %class.A, ptr %this, i64 0, i32 8, i32 0, i64 undef |
| 52 |
%0 = load i16, ptr %arrayidx.i31.1, align 2 |
| 53 |
%cmp8.1 = icmp ult i16 %0, 2 |
| 54 |
br i1 %cmp8.1, label %land.lhs.true.1, label %lor.lhs.false.1 |
| 55 |
|
| 56 |
cleanup16: ; preds = %for.inc.2, %lor.lhs.false.2, %lor.lhs.false, %land.lhs.true |
| 57 |
%1 = phi i1 [ true, %land.lhs.true ], [ true, %lor.lhs.false ], [ true, %lor.lhs.false.2 ], [ false, %for.inc.2 ] |
| 58 |
ret i1 %1 |
| 59 |
|
| 60 |
lor.lhs.false.1: ; preds = %for.inc |
| 61 |
unreachable |
| 62 |
|
| 63 |
land.lhs.true.1: ; preds = %for.inc |
| 64 |
br label %lor.lhs.false.2 |
| 65 |
|
| 66 |
lor.lhs.false.2: ; preds = %land.lhs.true.1 |
| 67 |
br i1 false, label %cleanup16, label %for.inc.2 |
| 68 |
|
| 69 |
for.inc.2: ; preds = %lor.lhs.false.2 |
| 70 |
br label %cleanup16 |
| 71 |
} |
| 72 |
|