llvm/llvm/test/CodeGen/LoongArch/cfr-copy.mir

# NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py UTC_ARGS: --version 3
# RUN: llc --mtriple=loongarch64 --mattr=+d %s -o - | FileCheck %s

## Check the PseudoCopyCFR instruction expand.

--- |
  target datalayout = "e-m:e-p:64:64-i64:64-i128:128-n64-S128"
  target triple = "loongarch64"

  define void @test() {
  ; CHECK-LABEL: test:
  ; CHECK:       # %bb.0:
  ; CHECK-NEXT:    fcmp.caf.s $fcc1, $fa0, $fa0
  ; CHECK-NEXT:    bceqz $fcc0, .LBB0_2
  ; CHECK-NEXT:  # %bb.1:
  ; CHECK-NEXT:    fcmp.cueq.s $fcc1, $fa0, $fa0
  ; CHECK-NEXT:  .LBB0_2:
  ; CHECK-NEXT:    movcf2gr $a0, $fcc1
  ; CHECK-NEXT:    ret
    ret void
  }
...
---
name: test
tracksRegLiveness: true
body:             |
  bb.0:
    liveins: $fcc0

    $fcc1 = COPY $fcc0
    $r4 = COPY $fcc1
    PseudoRET implicit killed $r4

...