1# RUN: llc --verify-machineinstrs -mtriple=aarch64 -o - %s -run-pass pipeliner -aarch64-enable-pipeliner -debug-only=pipeliner 2>&1 | FileCheck %s 2# REQUIRES: asserts 3 4# unacceptable loops by pipeliner 5 6... 7--- 8name: func1 9tracksRegLiveness: true 10body: | 11 ; multiple counter increment instructions 12 ; CHECK: Unable to analyzeLoop, can NOT pipeline Loop 13 bb.0.entry: 14 liveins: $x0, $x1 15 %10:gpr64 = COPY $x0 16 %11:gpr64 = COPY $x1 17 18 bb.1: 19 %12:gpr64 = PHI %11, %bb.0, %13, %bb.1 20 %13:gpr64 = ADDXrr %12, %11 21 %14:gpr64 = ADDXrr %13, %11 22 dead $xzr = SUBSXrr %10, %14, implicit-def $nzcv 23 Bcc 1, %bb.1, implicit $nzcv 24 B %bb.2 25 26 bb.2: 27... 28--- 29name: func2 30tracksRegLiveness: true 31body: | 32 ; neither operand of the increment instruction is a loop invariant value 33 ; CHECK: Unable to analyzeLoop, can NOT pipeline Loop 34 bb.0.entry: 35 liveins: $x0, $x1 36 %10:gpr64 = COPY $x0 37 %11:gpr64 = COPY $x1 38 39 bb.1: 40 %12:gpr64 = PHI %11, %bb.0, %13, %bb.1 41 %13:gpr64 = ADDXrr %12, %12 42 dead $xzr = SUBSXrr %10, %13, implicit-def $nzcv 43 Bcc 1, %bb.1, implicit $nzcv 44 B %bb.2 45 46 bb.2: 47... 48--- 49name: func3 50tracksRegLiveness: true 51body: | 52 ; neither operand of the compare instruction is a loop invariant value 53 ; CHECK: Unable to analyzeLoop, can NOT pipeline Loop 54 bb.0.entry: 55 liveins: $x0, $x1 56 %10:gpr64 = COPY $x0 57 %11:gpr64 = COPY $x1 58 59 bb.1: 60 %12:gpr64 = PHI %11, %bb.0, %13, %bb.1 61 %13:gpr64 = ADDXrr %12, %11 62 dead $xzr = SUBSXrr %13, %13, implicit-def $nzcv 63 Bcc 1, %bb.1, implicit $nzcv 64 B %bb.2 65 66 bb.2: 67... 68--- 69name: func4 70tracksRegLiveness: true 71body: | 72 ; multiple phi instructions 73 ; CHECK: Unable to analyzeLoop, can NOT pipeline Loop 74 bb.0.entry: 75 liveins: $x0, $x1 76 %10:gpr64 = COPY $x0 77 %11:gpr64 = COPY $x1 78 79 bb.1: 80 %12:gpr64 = PHI %11, %bb.0, %13, %bb.1 81 %14:gpr64 = PHI %11, %bb.0, %15, %bb.1 82 dead $xzr = SUBSXrr %12, %10, implicit-def $nzcv 83 %13:gpr64 = ADDXrr %14, %11 84 %15:gpr64 = ADDXrr %12, %11 85 Bcc 1, %bb.1, implicit $nzcv 86 B %bb.2 87 88 bb.2: 89... 90--- 91name: func5 92tracksRegLiveness: true 93body: | 94 ; not an increment instruction 95 ; CHECK: Unable to analyzeLoop, can NOT pipeline Loop 96 bb.0.entry: 97 liveins: $x0, $x1 98 %10:gpr64 = COPY $x0 99 %11:gpr64 = COPY $x1 100 101 bb.1: 102 %12:gpr64 = PHI %11, %bb.0, %13, %bb.1 103 %13:gpr64 = ORRXrr %12, %12 104 dead $xzr = SUBSXrr %12, %10, implicit-def $nzcv 105 Bcc 1, %bb.1, implicit $nzcv 106 B %bb.2 107 108 bb.2: 109... 110