Commit 88a2f40
authored
[Debug][AArch64] Do not crash on unknown subreg register sizes. (llvm#160442)
The AArch64 zsub regs are scalable, so defined with a size of -1 (which
comes through as 65535). The RegisterSize is only 128, so code to try
and find overlapping regs of a z30_z31 in DwarfEmitter can crash on
trying to access out of range bits in a BitVector. Hexagon and x86 also
contain subregs with unknown sizes.
Ideally most of these would be scalable values but in the meantime add a
check that the register are small enough to overlap with the current
register size, to prevent us from crashing.
This fixes the issue reported on llvm#153810.1 parent fcf020f commit 88a2f40
File tree
2 files changed
+345
-1
lines changed- llvm
- lib/CodeGen/AsmPrinter
- test/CodeGen/AArch64
2 files changed
+345
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
154 | 154 | | |
155 | 155 | | |
156 | 156 | | |
157 | | - | |
| 157 | + | |
158 | 158 | | |
159 | 159 | | |
160 | 160 | | |
| |||
0 commit comments