[llvm] [AMDGPU] Add MC clamp support for bf16 trans instructions (PR #203433)

via llvm-commits llvm-commits at lists.llvm.org
Thu Jun 11 19:16:40 PDT 2026


github-actions[bot] wrote:

<!--PREMERGE ADVISOR COMMENT: Linux-->
# :penguin: Linux x64 Test Results

* 175489 tests passed
* 3482 tests skipped
* 1 test failed

## Failed Tests
(click on a test name to see its output)

### LLVM
<details>
<summary>LLVM.CodeGen/AMDGPU/bf16-math.ll</summary>

```
Exit Code: 1

Command Output (stdout):
--
# RUN: at line 2
/home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/llc -mtriple=amdgcn -mcpu=gfx1250 -mattr=+real-true16 < /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/test/CodeGen/AMDGPU/bf16-math.ll | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/FileCheck --check-prefixes=GCN,TRUE16 /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/test/CodeGen/AMDGPU/bf16-math.ll
# executed command: /home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/llc -mtriple=amdgcn -mcpu=gfx1250 -mattr=+real-true16
# note: command had no output on stdout or stderr
# executed command: /home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/FileCheck --check-prefixes=GCN,TRUE16 /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/test/CodeGen/AMDGPU/bf16-math.ll
# note: command had no output on stdout or stderr
# RUN: at line 3
/home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/llc -mtriple=amdgcn -mcpu=gfx1250 -mattr=-real-true16 < /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/test/CodeGen/AMDGPU/bf16-math.ll | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/FileCheck --check-prefixes=GCN,FAKE16 /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/test/CodeGen/AMDGPU/bf16-math.ll
# executed command: /home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/llc -mtriple=amdgcn -mcpu=gfx1250 -mattr=-real-true16
# note: command had no output on stdout or stderr
# executed command: /home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/FileCheck --check-prefixes=GCN,FAKE16 /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/test/CodeGen/AMDGPU/bf16-math.ll
# .---command stderr------------
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/test/CodeGen/AMDGPU/bf16-math.ll:495:16: error: FAKE16-NEXT: expected string not found in input
# | ; FAKE16-NEXT: v_exp_bf16_e32 v0, v0
# |                ^
# | <stdin>:2192:89: note: scanning from here
# |  s_setreg_imm32_b32 hwreg(HW_REG_WAVE_MODE, 25, 1), 1 ; msbs: dst=0 src0=0 src1=0 src2=0
# |                                                                                         ^
# | <stdin>:2193:2: note: possible intended match here
# |  v_exp_bf16_e64 v0, v0 clamp
# |  ^
# | 
# | Input file: <stdin>
# | Check file: /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/test/CodeGen/AMDGPU/bf16-math.ll
# | 
# | -dump-input=help explains the following input dump.
# | 
# | Input was:
# | <<<<<<
# |             .
# |             .
# |             .
# |          2187:  .globl test_clamp_bf16_folding ; -- Begin function test_clamp_bf16_folding 
# |          2188:  .p2align 8 
# |          2189:  .type test_clamp_bf16_folding, at function 
# |          2190: test_clamp_bf16_folding: ; @test_clamp_bf16_folding 
# |          2191: ; %bb.0: 
# |          2192:  s_setreg_imm32_b32 hwreg(HW_REG_WAVE_MODE, 25, 1), 1 ; msbs: dst=0 src0=0 src1=0 src2=0 
# | next:495'0                                                                                             X error: no match found
# |          2193:  v_exp_bf16_e64 v0, v0 clamp 
# | next:495'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | next:495'1      ?                            possible intended match
# |          2194:  ; return to shader part epilog 
# | next:495'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# |          2195: .Lfunc_end35: 
# | next:495'0     ~~~~~~~~~~~~~~
# |          2196:  .size test_clamp_bf16_folding, .Lfunc_end35-test_clamp_bf16_folding 
# | next:495'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# |          2197:  ; -- End function 
# | next:495'0     ~~~~~~~~~~~~~~~~~~~
# |          2198:  .set .Ltest_clamp_bf16_folding.num_vgpr, 1 
# | next:495'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# |             .
# |             .
# |             .
# | >>>>>>
# `-----------------------------
# error: command failed with exit status: 1

--

```
</details>

If these failures are unrelated to your changes (for example tests are broken or flaky at HEAD), please open an issue at https://github.com/llvm/llvm-project/issues and add the `infrastructure` label.

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


More information about the llvm-commits mailing list