[all-commits] [llvm/llvm-project] 0da8d0: [AMDGPU] Change handling of unsupported non-comput...
Robert Imschweiler via All-commits
all-commits at lists.llvm.org
Thu Feb 13 07:23:30 PST 2025
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 0da8d0f9b712cd9e8110dff2b6bde87205af7932
https://github.com/llvm/llvm-project/commit/0da8d0f9b712cd9e8110dff2b6bde87205af7932
Author: Robert Imschweiler <50044286+ro-i at users.noreply.github.com>
Date: 2025-02-13 (Thu, 13 Feb 2025)
Changed paths:
M llvm/lib/Target/AMDGPU/SIISelLowering.cpp
M llvm/test/CodeGen/AMDGPU/no-hsa-graphics-shaders.ll
Log Message:
-----------
[AMDGPU] Change handling of unsupported non-compute shaders with HSA (#126798)
Previous handling in `SITargetLowering::LowerFormalArguments` only
reported a diagnostic message and continued execution by returning a
non-usable `SDValue`. This results in llvm crashing later with an
unrelated error. This commit changes the detection of an unsupported
non-compute shader to be a fatal error right away.
As an example situation, take the usage of an `amdgpu_ps` function and
the `amdgcn-unknown-amdhsa` target triple.
```
define amdgpu_ps void @foo(ptr %p, i32 %i) {
store i32 %i, ptr %p
ret void
}
```
Compiling this code (with `llc -mtriple=amdgcn-unknown-amdhsa
-mcpu=gfx942`, for example) fails with:
```
error: <unknown>:0:0: in function foo void (ptr, i32): unsupported non-compute shaders with HSA
llc:
[...]/git/trunk21.0/llvm-project/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp:11790:
void llvm::SelectionDAGISel::LowerArguments(const llvm::Function&):
Assertion `InVals.size() == Ins.size() && "LowerFormalArguments didn't emit the correct number of values!"' failed.
[...]
```
To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications
More information about the All-commits
mailing list