brintos

brintos / llvm-project-archived public Read only

0
0
Text · 2.3 KiB · 1c2436b Raw
61 lines · plain
1# NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py2# RUN: llc -mtriple=amdgcn-amd-amdhsa -mcpu=gfx900 -verify-machineinstrs -stress-regalloc=2 -start-before=greedy -stop-after=virtregmap -o - %s | FileCheck %s3 4# Test that a spill of a copy of m0 is not folded to be a spill of m0 directly.5 6---7 8name:            merge_sgpr_spill_into_copy_from_m09tracksRegLiveness: true10machineFunctionInfo:11  isEntryFunction: true12body:             |13  bb.0:14 15    ; CHECK-LABEL: name: merge_sgpr_spill_into_copy_from_m016    ; CHECK: S_NOP 0, implicit-def $m017    ; CHECK-NEXT: $sgpr0 = S_MOV_B32 $m018    ; CHECK-NEXT: $vgpr0 = IMPLICIT_DEF19    ; CHECK-NEXT: $vgpr0 = V_WRITELANE_B32 killed $sgpr0, 0, $vgpr020    ; CHECK-NEXT: $sgpr0 = V_READLANE_B32 $vgpr0, 021    ; CHECK-NEXT: S_NOP 0, implicit-def dead renamable $sgpr1, implicit-def dead renamable $sgpr0, implicit killed renamable $sgpr022    ; CHECK-NEXT: $sgpr0 = V_READLANE_B32 $vgpr0, 023    ; CHECK-NEXT: $m0 = S_MOV_B32 killed $sgpr024    ; CHECK-NEXT: S_NOP 025    ; CHECK-NEXT: S_SENDMSG 0, implicit $m0, implicit $exec26    S_NOP 0, implicit-def $m027    %0:sreg_32 = COPY $m028    S_NOP 0, implicit-def %1:sreg_32, implicit-def %2:sreg_32, implicit %029    $m0 = COPY %030    S_SENDMSG 0, implicit $m0, implicit $exec31 32...33 34# Test that a reload into a copy of m0 is not folded to be a reload of m0 directly.35 36---37 38name:            reload_sgpr_spill_into_copy_to_m039tracksRegLiveness: true40machineFunctionInfo:41  isEntryFunction: true42body:             |43  bb.0:44 45    ; CHECK-LABEL: name: reload_sgpr_spill_into_copy_to_m046    ; CHECK: $vgpr0 = IMPLICIT_DEF47    ; CHECK-NEXT: S_NOP 0, implicit-def renamable $sgpr0, implicit-def dead renamable $sgpr1, implicit-def $m048    ; CHECK-NEXT: $vgpr0 = V_WRITELANE_B32 killed $sgpr0, 0, $vgpr049    ; CHECK-NEXT: $sgpr0 = V_READLANE_B32 $vgpr0, 050    ; CHECK-NEXT: S_NOP 0, implicit killed renamable $sgpr0, implicit-def dead renamable $sgpr1, implicit-def dead renamable $sgpr051    ; CHECK-NEXT: $sgpr0 = V_READLANE_B32 $vgpr0, 052    ; CHECK-NEXT: $m0 = S_MOV_B32 killed $sgpr053    ; CHECK-NEXT: S_NOP 054    ; CHECK-NEXT: S_SENDMSG 0, implicit $m0, implicit $exec55    S_NOP 0, implicit-def %0:sreg_32, implicit-def %1:sreg_32, implicit-def $m056    S_NOP 0, implicit %0, implicit-def %3:sreg_32, implicit-def %4:sreg_3257    $m0 = COPY %058    S_SENDMSG 0, implicit $m0, implicit $exec59 60...61