[llvm] AMDGPU: Make v32bf16 a legal type (PR #76679)

Jay Foad via llvm-commits llvm-commits at lists.llvm.org
Tue Jan 9 02:46:50 PST 2024


jayfoad wrote:

This is causing:
```
FAIL: LLVM :: CodeGen/AMDGPU/bf16.ll (1 of 3422)
******************** TEST 'LLVM :: CodeGen/AMDGPU/bf16.ll' FAILED ********************
Exit Code: 1

Command Output (stderr):
--
RUN: at line 2: /home/jayfoad2/llvm-release/bin/llc < /home/jayfoad2/git/llvm-project/llvm/test/CodeGen/AMDGPU/bf16.ll -mtriple=amdgcn | /home/jayfoad2/llvm-release/bin/FileCheck /home/jayfoad2/git/llvm-project/llvm/test/CodeGen/AMDGPU/bf16.ll -check-prefixes=GCN
+ /home/jayfoad2/llvm-release/bin/llc -mtriple=amdgcn
+ /home/jayfoad2/llvm-release/bin/FileCheck /home/jayfoad2/git/llvm-project/llvm/test/CodeGen/AMDGPU/bf16.ll -check-prefixes=GCN
RUN: at line 3: /home/jayfoad2/llvm-release/bin/llc < /home/jayfoad2/git/llvm-project/llvm/test/CodeGen/AMDGPU/bf16.ll -mtriple=amdgcn -mcpu=hawaii | /home/jayfoad2/llvm-release/bin/FileCheck /home/jayfoad2/git/llvm-project/llvm/test/CodeGen/AMDGPU/bf16.ll -check-prefixes=GFX7
+ /home/jayfoad2/llvm-release/bin/FileCheck /home/jayfoad2/git/llvm-project/llvm/test/CodeGen/AMDGPU/bf16.ll -check-prefixes=GFX7
+ /home/jayfoad2/llvm-release/bin/llc -mtriple=amdgcn -mcpu=hawaii
RUN: at line 4: /home/jayfoad2/llvm-release/bin/llc < /home/jayfoad2/git/llvm-project/llvm/test/CodeGen/AMDGPU/bf16.ll -mtriple=amdgcn -mcpu=tonga | /home/jayfoad2/llvm-release/bin/FileCheck /home/jayfoad2/git/llvm-project/llvm/test/CodeGen/AMDGPU/bf16.ll -check-prefixes=GFX8
+ /home/jayfoad2/llvm-release/bin/llc -mtriple=amdgcn -mcpu=tonga
+ /home/jayfoad2/llvm-release/bin/FileCheck /home/jayfoad2/git/llvm-project/llvm/test/CodeGen/AMDGPU/bf16.ll -check-prefixes=GFX8
/home/jayfoad2/git/llvm-project/llvm/test/CodeGen/AMDGPU/bf16.ll:9836:14: error: GFX8-NEXT: expected string not found in input
; GFX8-NEXT: v_lshlrev_b32_e32 v31, 16, v16
             ^
<stdin>:3227:41: note: scanning from here
 s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
                                        ^
<stdin>:3228:2: note: possible intended match here
 v_lshlrev_b32_e32 v31, 16, v30
 ^
/home/jayfoad2/git/llvm-project/llvm/test/CodeGen/AMDGPU/bf16.ll:12151:14: error: GFX8-NEXT: expected string not found in input
; GFX8-NEXT: v_lshlrev_b32_e32 v31, 16, v16
             ^
<stdin>:3916:41: note: scanning from here
 s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
                                        ^
<stdin>:3917:2: note: possible intended match here
 v_lshlrev_b32_e32 v31, 16, v30
 ^
/home/jayfoad2/git/llvm-project/llvm/test/CodeGen/AMDGPU/bf16.ll:14689:14: error: GFX8-NEXT: expected string not found in input
; GFX8-NEXT: v_lshlrev_b32_e32 v31, 16, v16
             ^
<stdin>:4674:41: note: scanning from here
 s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
                                        ^
<stdin>:4675:2: note: possible intended match here
 v_lshlrev_b32_e32 v31, 16, v30
 ^
/home/jayfoad2/git/llvm-project/llvm/test/CodeGen/AMDGPU/bf16.ll:16816:14: error: GFX8-NEXT: expected string not found in input
; GFX8-NEXT: v_lshlrev_b32_e32 v31, 16, v16
             ^
<stdin>:5143:41: note: scanning from here
 s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
                                        ^
<stdin>:5144:2: note: possible intended match here
 v_lshlrev_b32_e32 v31, 16, v30
 ^
/home/jayfoad2/git/llvm-project/llvm/test/CodeGen/AMDGPU/bf16.ll:28231:14: error: GFX8-NEXT: is not on the line after the previous match
; GFX8-NEXT: v_writelane_b32 v31, s35, 3
             ^
<stdin>:9660:2: note: 'next' match was here
 v_writelane_b32 v31, s35, 3
 ^
<stdin>:9658:29: note: previous match ended here
 v_writelane_b32 v31, s34, 2
                            ^
<stdin>:9659:1: note: non-matching line after previous match is here
 v_and_b32_e32 v0, 1, v0
^

Input file: <stdin>
Check file: /home/jayfoad2/git/llvm-project/llvm/test/CodeGen/AMDGPU/bf16.ll

-dump-input=help explains the following input dump.

Input was:
<<<<<<
              .
              .
              .
           3222:  .globl v_fadd_v32bf16 ; -- Begin function v_fadd_v32bf16 
           3223:  .p2align 2 
           3224:  .type v_fadd_v32bf16, at function 
           3225: v_fadd_v32bf16: ; @v_fadd_v32bf16 
           3226: ; %bb.0: 
           3227:  s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0) 
next:9836'0                                              X error: no match found
           3228:  v_lshlrev_b32_e32 v31, 16, v30 
next:9836'0      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
next:9836'1       ?                               possible intended match
           3229:  v_lshlrev_b32_e32 v32, 16, v14 
next:9836'0      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
           3230:  v_and_b32_e32 v30, 0xffff0000, v30 
next:9836'0      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
           3231:  v_and_b32_e32 v14, 0xffff0000, v14 
next:9836'0      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
           3232:  v_add_f32_e32 v31, v32, v31 
next:9836'0      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
           3233:  v_add_f32_e32 v30, v14, v30 
next:9836'0      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
              .
              .
              .
           3911:  .globl v_fmul_v32bf16 ; -- Begin function v_fmul_v32bf16 
           3912:  .p2align 2 
           3913:  .type v_fmul_v32bf16, at function 
           3914: v_fmul_v32bf16: ; @v_fmul_v32bf16 
           3915: ; %bb.0: 
           3916:  s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0) 
next:12151'0                                             X error: no match found
           3917:  v_lshlrev_b32_e32 v31, 16, v30 
next:12151'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
next:12151'1      ?                               possible intended match
           3918:  v_lshlrev_b32_e32 v32, 16, v14 
next:12151'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
           3919:  v_and_b32_e32 v30, 0xffff0000, v30 
next:12151'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
           3920:  v_and_b32_e32 v14, 0xffff0000, v14 
next:12151'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
           3921:  v_mul_f32_e32 v31, v32, v31 
next:12151'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
           3922:  v_mul_f32_e32 v30, v14, v30 
next:12151'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
              .
              .
              .
           4669:  .globl v_minnum_v32bf16 ; -- Begin function v_minnum_v32bf16 
           4670:  .p2align 2 
           4671:  .type v_minnum_v32bf16, at function 
           4672: v_minnum_v32bf16: ; @v_minnum_v32bf16 
           4673: ; %bb.0: 
           4674:  s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0) 
next:14689'0                                             X error: no match found
           4675:  v_lshlrev_b32_e32 v31, 16, v30 
next:14689'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
next:14689'1      ?                               possible intended match
           4676:  v_lshlrev_b32_e32 v32, 16, v14 
next:14689'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
           4677:  v_and_b32_e32 v30, 0xffff0000, v30 
next:14689'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
           4678:  v_and_b32_e32 v14, 0xffff0000, v14 
next:14689'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
           4679:  v_min_f32_e32 v31, v32, v31 
next:14689'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
           4680:  v_min_f32_e32 v30, v14, v30 
next:14689'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
              .
              .
              .
           5138:  .globl v_maxnum_v32bf16 ; -- Begin function v_maxnum_v32bf16 
           5139:  .p2align 2 
           5140:  .type v_maxnum_v32bf16, at function 
           5141: v_maxnum_v32bf16: ; @v_maxnum_v32bf16 
           5142: ; %bb.0: 
           5143:  s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0) 
next:16816'0                                             X error: no match found
           5144:  v_lshlrev_b32_e32 v31, 16, v30 
next:16816'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
next:16816'1      ?                               possible intended match
           5145:  v_lshlrev_b32_e32 v32, 16, v14 
next:16816'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
           5146:  v_and_b32_e32 v30, 0xffff0000, v30 
next:16816'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
           5147:  v_and_b32_e32 v14, 0xffff0000, v14 
next:16816'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
           5148:  v_max_f32_e32 v31, v32, v31 
next:16816'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
           5149:  v_max_f32_e32 v30, v14, v30 
next:16816'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
              .
              .
              .
           9655:  s_mov_b64 exec, s[4:5] 
           9656:  v_writelane_b32 v31, s30, 0 
           9657:  v_writelane_b32 v31, s31, 1 
           9658:  v_writelane_b32 v31, s34, 2 
           9659:  v_and_b32_e32 v0, 1, v0 
           9660:  v_writelane_b32 v31, s35, 3 
next:28231        !~~~~~~~~~~~~~~~~~~~~~~~~~~  error: match on wrong line
           9661:  v_cmp_eq_u32_e32 vcc, 1, v0 
           9662:  v_and_b32_e32 v0, 1, v1 
           9663:  v_writelane_b32 v31, s36, 4 
           9664:  v_cmp_eq_u32_e64 s[4:5], 1, v0 
           9665:  v_and_b32_e32 v0, 1, v2 
              .
              .
              .
>>>>>>

--

********************
```

https://github.com/llvm/llvm-project/pull/76679


More information about the llvm-commits mailing list