Commit 2ba4537
committed
[TableGen] Fix inconsistent indexing of the RegistersByName table.
Previously, the initialization of this table in CodeGenRegBank() indexed the table with the name of the tblgen def, while the only user of the table in CompressInstEmitter::validateRegister() indexed it using the name of the tblgen Def. Apparently these were the same essentially all of the time, so the issue never manifested. This patch standardizes on indexing using the tblgen def name, as that is guaranteed to be unique.
This issue impacted the forthcoming implementation of the RISC Y extension (CHERI), in which the capability registers have the same AsmName as the GPRs, causing llvm-tblgen assertion failures.1 parent 9e3bbbb commit 2ba4537
1 file changed
+1
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1189 | 1189 | | |
1190 | 1190 | | |
1191 | 1191 | | |
1192 | | - | |
| 1192 | + | |
1193 | 1193 | | |
1194 | 1194 | | |
1195 | 1195 | | |
| |||
0 commit comments