|
| 1 | +# NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py UTC_ARGS: --version 5 |
| 2 | +# RUN: llc -mtriple=aarch64 -passes=machine-scheduler -o - %s | FileCheck %s |
| 3 | +# RUN: llc -mtriple=aarch64 -passes=machine-scheduler -misched-cutoff=1 -debug-only=machine-scheduler -o - %s 2>&1 | FileCheck %s --check-prefix=CHECK-CUTOFF |
| 4 | + |
| 5 | +# REQUIRES: asserts |
| 6 | + |
| 7 | +# CHECK-CUTOFF-COUNT-2: Scheduling SU |
| 8 | + |
| 9 | +# NOTE: copied from machine-scheduler.mir |
| 10 | + |
| 11 | +--- | |
| 12 | + define i64 @load_imp-def(ptr nocapture %P, i32 %v) { |
| 13 | + entry: |
| 14 | + %0 = bitcast ptr %P to ptr |
| 15 | + %1 = load i32, ptr %0 |
| 16 | + %conv = zext i32 %1 to i64 |
| 17 | + %arrayidx19 = getelementptr inbounds i64, ptr %P, i64 1 |
| 18 | + %arrayidx1 = bitcast ptr %arrayidx19 to ptr |
| 19 | + store i32 %v, ptr %arrayidx1 |
| 20 | + %2 = load i64, ptr %arrayidx19 |
| 21 | + %and = and i64 %2, 4294967295 |
| 22 | + %add = add nuw nsw i64 %and, %conv |
| 23 | + ret i64 %add |
| 24 | + } |
| 25 | +... |
| 26 | +--- |
| 27 | +name: load_imp-def |
| 28 | +tracksRegLiveness: true |
| 29 | +body: | |
| 30 | + bb.0.entry: |
| 31 | + liveins: $w1, $x0 |
| 32 | + ; CHECK-LABEL: name: load_imp-def |
| 33 | + ; CHECK: liveins: $w1, $x0 |
| 34 | + ; CHECK-NEXT: {{ $}} |
| 35 | + ; CHECK-NEXT: $w8 = LDRWui $x0, 1, implicit-def $x8 :: (load (s32) from %ir.0) |
| 36 | + ; CHECK-NEXT: $w9 = LDRWui $x0, 0, implicit-def $x9 :: (load (s32) from %ir.arrayidx19, align 8) |
| 37 | + ; CHECK-NEXT: STRWui $w1, $x0, 2 :: (store (s32) into %ir.arrayidx1) |
| 38 | + ; CHECK-NEXT: $x0 = ADDXrr killed $x9, killed $x8 |
| 39 | + ; CHECK-NEXT: RET_ReallyLR implicit $x0 |
| 40 | + ; |
| 41 | + ; CHECK-CUTOFF-LABEL: name: load_imp-def |
| 42 | + ; CHECK-CUTOFF: liveins: $w1, $x0 |
| 43 | + ; CHECK-CUTOFF-NEXT: {{ $}} |
| 44 | + ; CHECK-CUTOFF-NEXT: $w8 = LDRWui $x0, 1, implicit-def $x8 :: (load (s32) from %ir.0) |
| 45 | + ; CHECK-CUTOFF-NEXT: STRWui $w1, $x0, 2 :: (store (s32) into %ir.arrayidx1) |
| 46 | + ; CHECK-CUTOFF-NEXT: $w9 = LDRWui $x0, 0, implicit-def $x9 :: (load (s32) from %ir.arrayidx19, align 8) |
| 47 | + ; CHECK-CUTOFF-NEXT: $x0 = ADDXrr killed $x9, killed $x8 |
| 48 | + ; CHECK-CUTOFF-NEXT: RET_ReallyLR implicit $x0 |
| 49 | + $w8 = LDRWui $x0, 1, implicit-def $x8 :: (load (s32) from %ir.0) |
| 50 | + STRWui killed $w1, $x0, 2 :: (store (s32) into %ir.arrayidx1) |
| 51 | + $w9 = LDRWui killed $x0, 0, implicit-def $x9 :: (load (s32) from %ir.arrayidx19, align 8) |
| 52 | + $x0 = ADDXrr killed $x9, killed $x8 |
| 53 | + RET_ReallyLR implicit $x0 |
| 54 | +... |
| 55 | + |
0 commit comments