Commit a8c2770
committed
[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/D1225621 parent 774818c commit a8c2770
File tree
2 files changed
+38
-33
lines changed- llvm
- lib/Target/NVPTX
- test/CodeGen/NVPTX
2 files changed
+38
-33
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4260 | 4260 | | |
4261 | 4261 | | |
4262 | 4262 | | |
4263 | | - | |
4264 | | - | |
4265 | | - | |
4266 | | - | |
4267 | | - | |
4268 | | - | |
4269 | | - | |
4270 | | - | |
4271 | | - | |
4272 | | - | |
4273 | | - | |
4274 | | - | |
4275 | | - | |
4276 | | - | |
4277 | | - | |
4278 | | - | |
4279 | | - | |
4280 | | - | |
4281 | | - | |
4282 | | - | |
4283 | | - | |
4284 | | - | |
4285 | | - | |
4286 | | - | |
4287 | | - | |
4288 | | - | |
4289 | | - | |
4290 | | - | |
4291 | | - | |
4292 | | - | |
4293 | | - | |
4294 | | - | |
| 4263 | + | |
4295 | 4264 | | |
4296 | | - | |
| 4265 | + | |
| 4266 | + | |
| 4267 | + | |
4297 | 4268 | | |
4298 | 4269 | | |
4299 | 4270 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
0 commit comments