aboutsummaryrefslogtreecommitdiff
path: root/flang/lib/Frontend/CompilerInvocation.cpp
diff options
context:
space:
mode:
authorRobert Imschweiler <50044286+ro-i@users.noreply.github.com>2025-02-13 16:23:08 +0100
committerGitHub <noreply@github.com>2025-02-13 22:23:08 +0700
commit0da8d0f9b712cd9e8110dff2b6bde87205af7932 (patch)
tree31028d5241897dec5c122b0eb9bd23d478a1910b /flang/lib/Frontend/CompilerInvocation.cpp
parentd2240cd314102ed99d35b84d43006e324f344163 (diff)
downloadllvm-0da8d0f9b712cd9e8110dff2b6bde87205af7932.zip
llvm-0da8d0f9b712cd9e8110dff2b6bde87205af7932.tar.gz
llvm-0da8d0f9b712cd9e8110dff2b6bde87205af7932.tar.bz2
[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. [...] ```
Diffstat (limited to 'flang/lib/Frontend/CompilerInvocation.cpp')
0 files changed, 0 insertions, 0 deletions