llvm.org GIT mirror llvm / release_80 test / CodeGen / AMDGPU / GlobalISel / legalize-fma.mir
release_80

Tree @release_80 (Download .tar.gz)

legalize-fma.mir @release_80raw · history · blame

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

---
name: test_fma_f32
body: |
  bb.0:
    liveins: $vgpr0, $vgpr1, $vgpr2

    ; CHECK-LABEL: name: test_fma
    ; CHECK: [[COPY:%[0-9]+]]:_(s32) = COPY $vgpr0
    ; CHECK: [[COPY1:%[0-9]+]]:_(s32) = COPY $vgpr1
    ; CHECK: [[FMA:%[0-9]+]]:_(s32) = G_FMA [[COPY]], [[COPY1]]
    %0:_(s32) = COPY $vgpr0
    %1:_(s32) = COPY $vgpr1
    %2:_(s32) = COPY $vgpr2
    %3:_(s32) = G_FMA %0, %1, %2
    $vgpr0 = COPY %3
...
---
name: test_fma_f64
body: |
  bb.0:
    liveins: $vgpr0_vgpr1, $vgpr2_vgpr3,  $vgpr4_vgpr5

    ; CHECK-LABEL: name: test_fma
    ; CHECK: [[COPY:%[0-9]+]]:_(s64) = COPY $vgpr0_vgpr1
    ; CHECK: [[COPY1:%[0-9]+]]:_(s64) = COPY $vgpr2_vgpr3
    ; CHECK: [[FMA:%[0-9]+]]:_(s64) = G_FMA [[COPY]], [[COPY1]]
    %0:_(s64) = COPY $vgpr0_vgpr1
    %1:_(s64) = COPY $vgpr2_vgpr3
    %2:_(s64) = COPY $vgpr4_vgpr5
    %3:_(s64) = G_FMA %0, %1, %2
    $vgpr0_vgpr1 = COPY %3
...