11; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
2- ; RUN: llc -mtriple=amdgcn-mesa-mesa3d -mcpu=gfx1030 < %s | FileCheck -check-prefix=GFX10 %s
3- ; RUN: llc -global-isel -mtriple=amdgcn-mesa-mesa3d -mcpu=gfx1030 < %s | FileCheck -check-prefix=GFX10 %s
4- ; RUN: llc -mtriple=amdgcn-mesa-mesa3d -mcpu=gfx1100 < %s | FileCheck -check-prefix=GFX11 %s
5- ; RUN: llc -global-isel -mtriple=amdgcn-mesa-mesa3d -mcpu=gfx1100 < %s | FileCheck -check-prefix=GFX11 %s
2+ ; RUN: llc -global-isel=0 - mtriple=amdgcn-mesa-mesa3d -mcpu=gfx1030 < %s | FileCheck -check-prefix=GFX10 %s
3+ ; RUN: llc -global-isel=1 -mtriple=amdgcn-mesa-mesa3d -mcpu=gfx1030 < %s | FileCheck -check-prefix=GFX10 %s
4+ ; RUN: llc -global-isel=0 - mtriple=amdgcn-mesa-mesa3d -mcpu=gfx1100 < %s | FileCheck -check-prefix=GFX11 %s
5+ ; RUN: llc -global-isel=1 -mtriple=amdgcn-mesa-mesa3d -mcpu=gfx1100 < %s | FileCheck -check-prefix=GFX11 %s
66
77define float @v_fma (float %a , float %b , float %c ) {
88; GFX10-LABEL: v_fma:
@@ -20,6 +20,22 @@ define float @v_fma(float %a, float %b, float %c) {
2020 ret float %fma
2121}
2222
23+ define float @v_fmac (float %a , float %b , float %c ) {
24+ ; GFX10-LABEL: v_fmac:
25+ ; GFX10: ; %bb.0:
26+ ; GFX10-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
27+ ; GFX10-NEXT: v_fmac_legacy_f32_e32 v0, v1, v2
28+ ; GFX10-NEXT: s_setpc_b64 s[30:31]
29+ ;
30+ ; GFX11-LABEL: v_fmac:
31+ ; GFX11: ; %bb.0:
32+ ; GFX11-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
33+ ; GFX11-NEXT: v_fmac_dx9_zero_f32_e32 v0, v1, v2
34+ ; GFX11-NEXT: s_setpc_b64 s[30:31]
35+ %fma = call float @llvm.amdgcn.fma.legacy (float %b , float %c , float %a )
36+ ret float %fma
37+ }
38+
2339define float @v_fma_imm (float %a , float %c ) {
2440; GFX10-LABEL: v_fma_imm:
2541; GFX10: ; %bb.0:
@@ -36,6 +52,22 @@ define float @v_fma_imm(float %a, float %c) {
3652 ret float %fma
3753}
3854
55+ define float @v_fmac_imm (float %a , float %c ) {
56+ ; GFX10-LABEL: v_fmac_imm:
57+ ; GFX10: ; %bb.0:
58+ ; GFX10-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
59+ ; GFX10-NEXT: v_fmac_legacy_f32_e32 v0, 0x41200000, v1
60+ ; GFX10-NEXT: s_setpc_b64 s[30:31]
61+ ;
62+ ; GFX11-LABEL: v_fmac_imm:
63+ ; GFX11: ; %bb.0:
64+ ; GFX11-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
65+ ; GFX11-NEXT: v_fmac_dx9_zero_f32_e32 v0, 0x41200000, v1
66+ ; GFX11-NEXT: s_setpc_b64 s[30:31]
67+ %fma = call float @llvm.amdgcn.fma.legacy (float 10 .0 , float %c , float %a )
68+ ret float %fma
69+ }
70+
3971define float @v_fabs_fma (float %a , float %b , float %c ) {
4072; GFX10-LABEL: v_fabs_fma:
4173; GFX10: ; %bb.0:
0 commit comments