| # RUN: llc -mtriple=aarch64 -debug-only=machine-outliner \ |
| # RUN: -run-pass=machine-outliner -verify-machineinstrs %s -o /dev/null \ |
| # RUN: 2>&1 | FileCheck %s |
| # RUN: llc -mtriple=aarch64 -debug-only=machine-outliner \ |
| # RUN: -run-pass=mir-strip-debug,machine-outliner \ |
| # RUN: -mir-strip-debugify-only=0 -verify-machineinstrs %s -o /dev/null \ |
| # RUN: 2>&1 | FileCheck %s |
| # REQUIRES: asserts |
| |
| # A debug instruction must not make an otherwise too-short AArch64 range |
| # eligible for mapping. |
| |
| # CHECK-LABEL: MAPPING FUNCTION: range_without_debug |
| # CHECK: : 0 outlinable range(s) |
| # CHECK-LABEL: MAPPING FUNCTION: range_with_debug |
| # CHECK: : 0 outlinable range(s) |
| # CHECK-LABEL: MAPPING FUNCTION: debug_outside_range |
| # CHECK: Skipped 8 instructions outside outlinable range |
| |
| --- | |
| define void @range_without_debug() noredzone { unreachable } |
| define void @range_with_debug() noredzone { unreachable } |
| define void @debug_outside_range() noredzone { unreachable } |
| ... |
| --- |
| name: range_without_debug |
| tracksRegLiveness: true |
| body: | |
| bb.0: |
| liveins: $x0, $lr |
| $w16 = ORRWri $wzr, 7 |
| $w8 = ORRWri $w16, 5 |
| RET undef $lr |
| ... |
| --- |
| name: range_with_debug |
| tracksRegLiveness: true |
| body: | |
| bb.0: |
| liveins: $x0, $lr |
| $w16 = ORRWri $wzr, 7 |
| $w8 = ORRWri $w16, 5 |
| DBG_VALUE $x0, 0 |
| RET undef $lr |
| ... |
| --- |
| name: debug_outside_range |
| tracksRegLiveness: true |
| machineFunctionInfo: |
| hasRedZone: false |
| body: | |
| bb.0: |
| liveins: $x0, $x9 |
| $x16 = ADDXri $x0, 16, 0 |
| DBG_VALUE $x0, 0 |
| $x9 = ADDXri $x9, 16, 0 |
| $x9 = ADDXri $x9, 16, 0 |
| $x9 = ADDXri $x9, 16, 0 |
| $x9 = ADDXri $x9, 16, 0 |
| $x9 = ADDXri $x9, 16, 0 |
| $x9 = ADDXri $x9, 16, 0 |
| $x16 = ADDXri killed $x16, 16, 0 |
| $x0 = ADDXri $x0, 0, 0 |
| $x1 = ADDXri $x0, 1, 0 |
| $x2 = ADDXri $x0, 2, 0 |
| $x3 = ADDXri $x0, 3, 0 |
| $x8 = ADDXri $x3, 3, 0 |
| $x0 = ADDXri $x0, 0, 0 |
| $x1 = ADDXri $x0, 1, 0 |
| $x2 = ADDXri $x0, 2, 0 |
| $x3 = ADDXri $x0, 3, 0 |
| RET undef $x9 |
| ... |