diff options
author | Daniil Kovalev <daniil@kovalev.website> | 2022-03-28 17:33:48 +0300 |
---|---|---|
committer | Daniil Kovalev <daniil@kovalev.website> | 2022-03-28 17:34:58 +0300 |
commit | a8c277041aafc0b0753cf191a4891153a2d7679c (patch) | |
tree | dc12a5ec294485287bde6cc1fd3cc94ad4b98451 /llvm/lib/IR/Module.cpp | |
parent | 774818c09c9abd952aaae6db6d045be8dd98f168 (diff) | |
download | llvm-a8c277041aafc0b0753cf191a4891153a2d7679c.zip llvm-a8c277041aafc0b0753cf191a4891153a2d7679c.tar.gz llvm-a8c277041aafc0b0753cf191a4891153a2d7679c.tar.bz2 |
[NVPTX] Fix poorly designed assertion introduced in D120129
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.
Differential Revision: https://reviews.llvm.org/D122562
Diffstat (limited to 'llvm/lib/IR/Module.cpp')
0 files changed, 0 insertions, 0 deletions