Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
There might be a more elegant way to test if an instruction still has users for its def/reg, anyone know?
Also I could add a test for this.. this particular situation does not come up in C/C++, but I could de-compile the Rust generated bitcode (see linked bug) to ll and generate a test from that. Not sure how useful that is though, as eraseFromParent was clearly wrong here and this is the code that should have been there in the first place.
| llvm/lib/Target/WebAssembly/WebAssemblyFixBrTableDefaults.cpp | ||
|---|---|---|
| 68–71 | Looks like we probably want to use MachineRegisterInfo::hasOneNonDBGUser(Register RegNo) here. Hopefully that lets us get rid of the goto ;) | |
Also, it would be nice to have a test for this, but if it would be too much trouble, then I guess it's fine.
| llvm/lib/Target/WebAssembly/WebAssemblyFixBrTableDefaults.cpp | ||
|---|---|---|
| 68–71 | Thanks! Not sure how I managed to miss those functions. In this case use_nodbg_empty is the one we actually want, since the use by br_table has already been removed. | |
Looks like we probably want to use MachineRegisterInfo::hasOneNonDBGUser(Register RegNo) here. Hopefully that lets us get rid of the goto ;)