Commit 4f8e766
authored
[AsmPrinter] Do not emit label instructions after the function body if the target is SPIR-V (#107013)
AsmPrinter always creates a symbol for the end of function if valid
debug info is present. However, this breaks SPIR-V target's output,
because SPIR-V specification allows label instructions only inside a
block, not after the function body (see
https://registry.khronos.org/SPIR-V/specs/unified1/SPIRV.html#OpLabel).
This PR proposes to disable emission of label instructions after the
function body if the target is SPIR-V.
This PR is a fix of the
#102732 issue.1 parent 5dc15dd commit 4f8e766
File tree
2 files changed
+6
-1
lines changed- llvm
- lib/CodeGen/AsmPrinter
- test/CodeGen/SPIRV/debug-info
2 files changed
+6
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1971 | 1971 | | |
1972 | 1972 | | |
1973 | 1973 | | |
1974 | | - | |
| 1974 | + | |
| 1975 | + | |
| 1976 | + | |
| 1977 | + | |
1975 | 1978 | | |
1976 | 1979 | | |
1977 | 1980 | | |
| |||
Lines changed: 2 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
29 | 29 | | |
30 | 30 | | |
31 | 31 | | |
| 32 | + | |
32 | 33 | | |
33 | 34 | | |
34 | 35 | | |
35 | 36 | | |
36 | 37 | | |
| 38 | + | |
37 | 39 | | |
38 | 40 | | |
39 | 41 | | |
| |||
0 commit comments