[llvm] [AMDGPU] Add waterfall intrinsics (PR #192409)
via llvm-commits
llvm-commits at lists.llvm.org
Thu Apr 16 05:52:22 PDT 2026
github-actions[bot] wrote:
<!--PREMERGE ADVISOR COMMENT: Linux-->
# :penguin: Linux x64 Test Results
* 172789 tests passed
* 3169 tests skipped
* 1 test failed
## Failed Tests
(click on a test name to see its output)
### LLVM
<details>
<summary>LLVM.Transforms/InstCombine/AMDGPU/waterfall.ll</summary>
```
Exit Code: 1
Command Output (stdout):
--
# RUN: at line 2
/home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/opt -S -passes=instcombine -mtriple=amdgcn-amd-amdhsa /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/test/Transforms/InstCombine/AMDGPU/waterfall.ll | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/FileCheck /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/test/Transforms/InstCombine/AMDGPU/waterfall.ll
# executed command: /home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/opt -S -passes=instcombine -mtriple=amdgcn-amd-amdhsa /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/test/Transforms/InstCombine/AMDGPU/waterfall.ll
# note: command had no output on stdout or stderr
# executed command: /home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/FileCheck /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/test/Transforms/InstCombine/AMDGPU/waterfall.ll
# .---command stderr------------
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/test/Transforms/InstCombine/AMDGPU/waterfall.ll:9:15: error: CHECK-NEXT: expected string not found in input
# | ; CHECK-NEXT: [[PTR:%.*]] = getelementptr <8 x i32>, ptr addrspace(4) [[IN:%.*]], i64 [[TMP1]]
# | ^
# | <stdin>:9:29: note: scanning from here
# | %1 = sext i32 %s_idx to i64
# | ^
# | <stdin>:9:29: note: with "TMP1" equal to "%1"
# | %1 = sext i32 %s_idx to i64
# | ^
# | <stdin>:10:2: note: possible intended match here
# | %ptr = getelementptr [32 x i8], ptr addrspace(4) %in, i64 %1
# | ^
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/test/Transforms/InstCombine/AMDGPU/waterfall.ll:30:15: error: CHECK-NEXT: expected string not found in input
# | ; CHECK-NEXT: [[PTR:%.*]] = getelementptr <8 x i32>, ptr addrspace(4) [[IN:%.*]], i64 [[TMP1]]
# | ^
# | <stdin>:20:29: note: scanning from here
# | %1 = sext i32 %s_idx to i64
# | ^
# | <stdin>:20:29: note: with "TMP1" equal to "%1"
# | %1 = sext i32 %s_idx to i64
# | ^
# | <stdin>:21:2: note: possible intended match here
# | %ptr = getelementptr [32 x i8], ptr addrspace(4) %in, i64 %1
# | ^
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/test/Transforms/InstCombine/AMDGPU/waterfall.ll:53:15: error: CHECK-NEXT: expected string not found in input
# | ; CHECK-NEXT: [[PTR:%.*]] = getelementptr <8 x i32>, ptr addrspace(4) [[IN:%.*]], i64 [[TMP1]]
# | ^
# | <stdin>:32:29: note: scanning from here
# | %1 = sext i32 %s_idx to i64
# | ^
# | <stdin>:32:29: note: with "TMP1" equal to "%1"
# | %1 = sext i32 %s_idx to i64
# | ^
# | <stdin>:33:2: note: possible intended match here
# | %ptr = getelementptr [32 x i8], ptr addrspace(4) %in, i64 %1
# | ^
# |
# | Input file: <stdin>
# | Check file: /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/test/Transforms/InstCombine/AMDGPU/waterfall.ll
# |
# | -dump-input=help explains the following input dump.
# |
# | Input was:
# | <<<<<<
# | 1: ; ModuleID = '/home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/test/Transforms/InstCombine/AMDGPU/waterfall.ll'
# | 2: source_filename = "/home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/test/Transforms/InstCombine/AMDGPU/waterfall.ll"
# | 3: target datalayout = "e-m:e-p:64:64-p1:64:64-p2:32:32-p3:32:32-p4:64:64-p5:32:32-p6:32:32-p7:160:256:256:32-p8:128:128:128:48-p9:192:256:256:32-i64:64-v16:16-v24:32-v32:32-v48:64-v96:128-v192:256-v256:256-v512:512-v1024:1024-v2048:2048-n32:64-S32-A5-G1-ni:7:8:9"
# | 4: target triple = "amdgcn-amd-amdhsa"
# | 5:
# | 6: define amdgpu_ps <4 x float> @test_waterfall_same_index2(ptr addrspace(4) inreg %in, i32 %index, float %s, <4 x i32> inreg %samp) {
# | 7: %wf_token1 = call i32 @llvm.amdgcn.waterfall.begin.i32(i32 0, i32 %index)
# | 8: %s_idx = call i32 @llvm.amdgcn.waterfall.readfirstlane.i32.i32(i32 %wf_token1, i32 %index)
# | 9: %1 = sext i32 %s_idx to i64
# | next:9'0 X error: no match found
# | next:9'1 with "TMP1" equal to "%1"
# | 10: %ptr = getelementptr [32 x i8], ptr addrspace(4) %in, i64 %1
# | next:9'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | next:9'2 ? possible intended match
# | 11: %rsrc = load <8 x i32>, ptr addrspace(4) %ptr, align 32
# | next:9'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | 12: %r = call <4 x float> @llvm.amdgcn.image.sample.1d.v4f32.f32.v8i32.v4i32(i32 15, float %s, <8 x i32> %rsrc, <4 x i32> %samp, i1 false, i32 0, i32 0)
# | next:9'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | 13: %r1 = call <4 x float> @llvm.amdgcn.waterfall.end.v4f32(i32 %wf_token1, <4 x float> %r)
# | next:9'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | 14: ret <4 x float> %r1
# | next:9'0 ~~~~~~~~~~~~~~~~~~~~~
# | 15: }
# | next:9'0 ~~
# | 16:
# | next:9'0 ~
# | 17: define amdgpu_ps <4 x float> @test_waterfall_same_index3(ptr addrspace(4) inreg %in, i32 %index, float %s, <4 x i32> inreg %samp) {
# | next:9'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | 18: %wf_token1 = call i32 @llvm.amdgcn.waterfall.begin.i32(i32 0, i32 %index)
# | 19: %s_idx = call i32 @llvm.amdgcn.waterfall.readfirstlane.i32.i32(i32 %wf_token1, i32 %index)
# | 20: %1 = sext i32 %s_idx to i64
# | next:30'0 X error: no match found
# | next:30'1 with "TMP1" equal to "%1"
# | 21: %ptr = getelementptr [32 x i8], ptr addrspace(4) %in, i64 %1
# | next:30'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | next:30'2 ? possible intended match
# | 22: %rsrc = load <8 x i32>, ptr addrspace(4) %ptr, align 32
# | next:30'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | 23: %r = call <4 x float> @llvm.amdgcn.image.sample.1d.v4f32.f32.v8i32.v4i32(i32 15, float %s, <8 x i32> %rsrc, <4 x i32> %samp, i1 false, i32 0, i32 0)
# | next:30'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | 24: %r1 = call <4 x float> @llvm.amdgcn.waterfall.end.v4f32(i32 %wf_token1, <4 x float> %r)
# | next:30'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | 25: ret <4 x float> %r1
# | next:30'0 ~~~~~~~~~~~~~~~~~~~~~
# | 26: }
# | next:30'0 ~~
# | 27:
# | next:30'0 ~
# | 28: define amdgpu_ps <4 x float> @test_waterfall_same_index_aba(ptr addrspace(4) inreg %in, i32 %index1, i32 %index2, float %s, <4 x i32> inreg %samp) {
# | next:30'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | 29: %wf_token1 = call i32 @llvm.amdgcn.waterfall.begin.i32(i32 0, i32 %index1)
# | 30: %wf_token2 = call i32 @llvm.amdgcn.waterfall.begin.i32(i32 %wf_token1, i32 %index2)
# | 31: %s_idx = call i32 @llvm.amdgcn.waterfall.readfirstlane.i32.i32(i32 %wf_token2, i32 %index2)
# | 32: %1 = sext i32 %s_idx to i64
# | next:53'0 X error: no match found
# | next:53'1 with "TMP1" equal to "%1"
# | 33: %ptr = getelementptr [32 x i8], ptr addrspace(4) %in, i64 %1
# | next:53'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | next:53'2 ? possible intended match
# | 34: %rsrc = load <8 x i32>, ptr addrspace(4) %ptr, align 32
# | next:53'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | 35: %r = call <4 x float> @llvm.amdgcn.image.sample.1d.v4f32.f32.v8i32.v4i32(i32 15, float %s, <8 x i32> %rsrc, <4 x i32> %samp, i1 false, i32 0, i32 0)
# | next:53'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | 36: %r1 = call <4 x float> @llvm.amdgcn.waterfall.end.v4f32(i32 %wf_token2, <4 x float> %r)
# | next:53'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | 37: ret <4 x float> %r1
# | next:53'0 ~~~~~~~~~~~~~~~~~~~~~
# | 38: }
# | next:53'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/192409
More information about the llvm-commits
mailing list