Files
clang-p2996/llvm/test/CodeGen/AMDGPU/twoaddr-wmma.mir
Jay Foad a68c7241ec [AMDGPU] Run twoaddr tests with -early-live-intervals (#66775)
Sample test case:

%3 = V_FMAC_F32_e32 killed %0, %1, %2, implicit $mode, implicit $exec

With LiveVariables this is converted to three-address form just because
there is no "killed" flag on %2. To make it do the same thing with
LiveIntervals I added a later use of %2:

%3 = V_FMAC_F32_e32 killed %0, %1, %2, implicit $mode, implicit $exec
    S_ENDPGM 0, implicit %2
2023-09-20 08:22:00 +01:00

219 lines
7.6 KiB
YAML

# RUN: llc -march=amdgcn -mcpu=gfx1100 %s -run-pass twoaddressinstruction -verify-machineinstrs -o - | FileCheck -check-prefix=GCN %s
# RUN: llc -march=amdgcn -mcpu=gfx1100 %s -run-pass twoaddressinstruction -verify-machineinstrs -o - -early-live-intervals | FileCheck -check-prefix=GCN %s
# GCN-LABEL: name: test_v_wmma_f32_16x16x16_f16_twoaddr_w32
# GCN: early-clobber %2:vreg_256 = V_WMMA_F32_16X16X16_F16_threeaddr_w32 8, killed %1, 8, killed %1, 8, %0, 0, 0, implicit $exec
---
name: test_v_wmma_f32_16x16x16_f16_twoaddr_w32
registers:
- { id: 0, class: vreg_256 }
- { id: 1, class: vreg_256 }
- { id: 2, class: vreg_256 }
body: |
bb.0:
%0 = IMPLICIT_DEF
%1 = IMPLICIT_DEF
early-clobber %2:vreg_256 = V_WMMA_F32_16X16X16_F16_twoaddr_w32 8, killed %1:vreg_256, 8, killed %1:vreg_256, 8, %0:vreg_256, 0, 0, implicit $exec
S_ENDPGM 0, implicit %0
...
# GCN-LABEL: name: test_v_wmma_f32_16x16x16_bf16_twoaddr_w32
# GCN: early-clobber %2:vreg_256 = V_WMMA_F32_16X16X16_BF16_threeaddr_w32 8, killed %1, 8, killed %1, 8, %0, 0, 0, implicit $exec
---
name: test_v_wmma_f32_16x16x16_bf16_twoaddr_w32
registers:
- { id: 0, class: vreg_256 }
- { id: 1, class: vreg_256 }
- { id: 2, class: vreg_256 }
body: |
bb.0:
%0 = IMPLICIT_DEF
%1 = IMPLICIT_DEF
early-clobber %2:vreg_256 = V_WMMA_F32_16X16X16_BF16_twoaddr_w32 8, killed %1:vreg_256, 8, killed %1:vreg_256, 8, %0:vreg_256, 0, 0, implicit $exec
S_ENDPGM 0, implicit %0
...
# GCN-LABEL: name: test_v_wmma_f16_16x16x16_f16_twoaddr_w32
# GCN: early-clobber %2:vreg_256 = V_WMMA_F16_16X16X16_F16_threeaddr_w32 8, killed %1, 8, killed %1, 8, %0, 0, 0, 0, 0, implicit $exec
---
name: test_v_wmma_f16_16x16x16_f16_twoaddr_w32
registers:
- { id: 0, class: vreg_256 }
- { id: 1, class: vreg_256 }
- { id: 2, class: vreg_256 }
body: |
bb.0:
%0 = IMPLICIT_DEF
%1 = IMPLICIT_DEF
early-clobber %2:vreg_256 = V_WMMA_F16_16X16X16_F16_twoaddr_w32 8, killed %1:vreg_256, 8, killed %1:vreg_256, 8, %0:vreg_256, 0, 0, 0, 0, implicit $exec
S_ENDPGM 0, implicit %0
...
# GCN-LABEL: name: test_v_wmma_bf16_16x16x16_bf16_twoaddr_w32
# GCN: early-clobber %2:vreg_256 = V_WMMA_BF16_16X16X16_BF16_threeaddr_w32 8, killed %1, 8, killed %1, 8, %0, 0, 0, 0, 0, implicit $exec
---
name: test_v_wmma_bf16_16x16x16_bf16_twoaddr_w32
registers:
- { id: 0, class: vreg_256 }
- { id: 1, class: vreg_256 }
- { id: 2, class: vreg_256 }
body: |
bb.0:
%0 = IMPLICIT_DEF
%1 = IMPLICIT_DEF
early-clobber %2:vreg_256 = V_WMMA_BF16_16X16X16_BF16_twoaddr_w32 8, killed %1:vreg_256, 8, killed %1:vreg_256, 8, %0:vreg_256, 0, 0, 0, 0, implicit $exec
S_ENDPGM 0, implicit %0
...
# GCN-LABEL: name: test_v_wmma_i32_16x16x16_iu8_twoaddr_w32
# GCN: early-clobber %2:vreg_256 = V_WMMA_I32_16X16X16_IU8_threeaddr_w32 8, killed %1, 8, killed %1, 8, %0, 0, 0, 0, implicit $exec
---
name: test_v_wmma_i32_16x16x16_iu8_twoaddr_w32
registers:
- { id: 0, class: vreg_256 }
- { id: 1, class: vreg_128 }
- { id: 2, class: vreg_256 }
body: |
bb.0:
%0 = IMPLICIT_DEF
%1 = IMPLICIT_DEF
early-clobber %2:vreg_256 = V_WMMA_I32_16X16X16_IU8_twoaddr_w32 8, killed %1:vreg_128, 8, killed %1:vreg_128, 8, %0:vreg_256, 0, 0, 0, implicit $exec
S_ENDPGM 0, implicit %0
...
# GCN-LABEL: name: test_v_wmma_i32_16x16x16_iu4_twoaddr_w32
# GCN: early-clobber %2:vreg_256 = V_WMMA_I32_16X16X16_IU4_threeaddr_w32 8, killed %1, 8, killed %1, 8, %0, 0, 0, 0, implicit $exec
---
name: test_v_wmma_i32_16x16x16_iu4_twoaddr_w32
registers:
- { id: 0, class: vreg_256 }
- { id: 1, class: vreg_64 }
- { id: 2, class: vreg_256 }
body: |
bb.0:
%0 = IMPLICIT_DEF
%1 = IMPLICIT_DEF
early-clobber %2:vreg_256 = V_WMMA_I32_16X16X16_IU4_twoaddr_w32 8, killed %1:vreg_64, 8, killed %1:vreg_64, 8, %0:vreg_256, 0, 0, 0, implicit $exec
S_ENDPGM 0, implicit %0
...
# GCN-LABEL: name: test_v_wmma_f32_16x16x16_f16_twoaddr_w64
# GCN: early-clobber %2:vreg_128 = V_WMMA_F32_16X16X16_F16_threeaddr_w64 8, killed %1, 8, killed %1, 8, %0, 0, 0, implicit $exec
---
name: test_v_wmma_f32_16x16x16_f16_twoaddr_w64
registers:
- { id: 0, class: vreg_128 }
- { id: 1, class: vreg_256 }
- { id: 2, class: vreg_128 }
body: |
bb.0:
%0 = IMPLICIT_DEF
%1 = IMPLICIT_DEF
early-clobber %2:vreg_128 = V_WMMA_F32_16X16X16_F16_twoaddr_w64 8, killed %1:vreg_256, 8, killed %1:vreg_256, 8, %0:vreg_128, 0, 0, implicit $exec
S_ENDPGM 0, implicit %0
...
# GCN-LABEL: name: test_v_wmma_f32_16x16x16_bf16_twoaddr_w64
# GCN: early-clobber %2:vreg_128 = V_WMMA_F32_16X16X16_BF16_threeaddr_w64 8, killed %1, 8, killed %1, 8, %0, 0, 0, implicit $exec
---
name: test_v_wmma_f32_16x16x16_bf16_twoaddr_w64
registers:
- { id: 0, class: vreg_128 }
- { id: 1, class: vreg_256 }
- { id: 2, class: vreg_128 }
body: |
bb.0:
%0 = IMPLICIT_DEF
%1 = IMPLICIT_DEF
early-clobber %2:vreg_128 = V_WMMA_F32_16X16X16_BF16_twoaddr_w64 8, killed %1:vreg_256, 8, killed %1:vreg_256, 8, %0:vreg_128, 0, 0, implicit $exec
S_ENDPGM 0, implicit %0
...
# GCN-LABEL: name: test_v_wmma_f16_16x16x16_f16_twoaddr_w64
# GCN: early-clobber %2:vreg_128 = V_WMMA_F16_16X16X16_F16_threeaddr_w64 8, killed %1, 8, killed %1, 8, %0, 0, 0, 0, 0, implicit $exec
---
name: test_v_wmma_f16_16x16x16_f16_twoaddr_w64
registers:
- { id: 0, class: vreg_128 }
- { id: 1, class: vreg_256 }
- { id: 2, class: vreg_128 }
body: |
bb.0:
%0 = IMPLICIT_DEF
%1 = IMPLICIT_DEF
early-clobber %2:vreg_128 = V_WMMA_F16_16X16X16_F16_twoaddr_w64 8, killed %1:vreg_256, 8, killed %1:vreg_256, 8, %0:vreg_128, 0, 0, 0, 0, implicit $exec
S_ENDPGM 0, implicit %0
...
# GCN-LABEL: name: test_v_wmma_bf16_16x16x16_bf16_twoaddr_w64
# GCN: early-clobber %2:vreg_128 = V_WMMA_BF16_16X16X16_BF16_threeaddr_w64 8, killed %1, 8, killed %1, 8, %0, 0, 0, 0, 0, implicit $exec
---
name: test_v_wmma_bf16_16x16x16_bf16_twoaddr_w64
registers:
- { id: 0, class: vreg_128 }
- { id: 1, class: vreg_256 }
- { id: 2, class: vreg_128 }
body: |
bb.0:
%0 = IMPLICIT_DEF
%1 = IMPLICIT_DEF
early-clobber %2:vreg_128 = V_WMMA_BF16_16X16X16_BF16_twoaddr_w64 8, killed %1:vreg_256, 8, killed %1:vreg_256, 8, %0:vreg_128, 0, 0, 0, 0, implicit $exec
S_ENDPGM 0, implicit %0
...
# GCN-LABEL: name: test_v_wmma_i32_16x16x16_iu8_twoaddr_w64
# GCN: early-clobber %2:vreg_128 = V_WMMA_I32_16X16X16_IU8_threeaddr_w64 8, killed %1, 8, killed %1, 8, %0, 0, 0, 0, implicit $exec
---
name: test_v_wmma_i32_16x16x16_iu8_twoaddr_w64
registers:
- { id: 0, class: vreg_128 }
- { id: 1, class: vreg_128 }
- { id: 2, class: vreg_128 }
body: |
bb.0:
%0 = IMPLICIT_DEF
%1 = IMPLICIT_DEF
early-clobber %2:vreg_128 = V_WMMA_I32_16X16X16_IU8_twoaddr_w64 8, killed %1:vreg_128, 8, killed %1:vreg_128, 8, %0:vreg_128, 0, 0, 0, implicit $exec
S_ENDPGM 0, implicit %0
...
# GCN-LABEL: name: test_v_wmma_i32_16x16x16_iu4_twoaddr_w64
# GCN: early-clobber %2:vreg_128 = V_WMMA_I32_16X16X16_IU4_threeaddr_w64 8, killed %1, 8, killed %1, 8, %0, 0, 0, 0, implicit $exec
---
name: test_v_wmma_i32_16x16x16_iu4_twoaddr_w64
registers:
- { id: 0, class: vreg_128 }
- { id: 1, class: vreg_64 }
- { id: 2, class: vreg_128 }
body: |
bb.0:
%0 = IMPLICIT_DEF
%1 = IMPLICIT_DEF
early-clobber %2:vreg_128 = V_WMMA_I32_16X16X16_IU4_twoaddr_w64 8, killed %1:vreg_64, 8, killed %1:vreg_64, 8, %0:vreg_128, 0, 0, 0, implicit $exec
S_ENDPGM 0, implicit %0
...