llvm/llvm/test/CodeGen/MIR/AMDGPU/target-memoperands.mir

# NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py
# RUN: llc -mtriple=amdgcn -run-pass none -o - %s | FileCheck %s

---
name: target_memoperands_noclobber
body: |
  bb.0:
    liveins: $sgpr0_sgpr1
    ; CHECK-LABEL: name: target_memoperands
    ; CHECK: [[COPY:%[0-9]+]]:_(p4) = COPY $sgpr0_sgpr1
    ; CHECK-NEXT: [[LOAD:%[0-9]+]]:_(s32) = G_LOAD [[COPY]](p4) :: ("amdgpu-noclobber" load (s32))
    %0:_(p4) = COPY $sgpr0_sgpr1
    %1:_(s32) = G_LOAD %0 :: ("amdgpu-noclobber" load (s32))
...

---
name: target_memoperands_last_use
body: |
  bb.0:
    liveins: $sgpr0_sgpr1
    ; CHECK-LABEL: name: target_memoperands
    ; CHECK: [[COPY:%[0-9]+]]:_(p4) = COPY $sgpr0_sgpr1
    ; CHECK-NEXT: [[LOAD:%[0-9]+]]:_(s32) = G_LOAD [[COPY]](p4) :: ("amdgpu-last-use" load (s32))
    %0:_(p4) = COPY $sgpr0_sgpr1
    %1:_(s32) = G_LOAD %0 :: ("amdgpu-last-use" load (s32))
...