NVPTXTargetLowering::getFunctionParamOptimizedAlign, which was introduces in
D120129, contained a poorly designed assertion checking that a function with
internal or private linkage is not a kernel. It relied on invariants that
were not actually guaranteed, and that resulted in compiler crash with some
CUDA versions (see discussion with @jdoerfert in D120129). This patch changes
that assertion and makes it use isKernelFunction which is designed exactly for
such checks. This patch also includes a test with IR that caused compiler crash
before.
Details
Details
Diff Detail
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
Comment Actions
LG, one nit.
(Also much cleaner, thanks)
llvm/lib/Target/NVPTX/NVPTXISelLowering.cpp | ||
---|---|---|
4266 | Add some text, && "Expected kernels to have external linkage"), or similar. |
Comment Actions
@jdoerfert Merged, hope your CI will be fixed. Could you please change "Changes requested" mark in D120129 when you verify that everything is OK? Just to make that revision closed again.
llvm/lib/Target/NVPTX/NVPTXISelLowering.cpp | ||
---|---|---|
4266 | Ah, forgot that, thanks! |
Add some text, && "Expected kernels to have external linkage"), or similar.