[PATCH] D113230: [WebAssembly] Fix fixBrTableIndex removing instruction without checking uses

Thomas Lively via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Nov 5 11:41:05 PDT 2021


tlively added inline comments.


================
Comment at: llvm/lib/Target/WebAssembly/WebAssemblyFixBrTableDefaults.cpp:68-71
+    for (MachineInstr &UseMI : MF.getRegInfo().use_instructions(ExtDefReg)) {
+      if (&UseMI != &MI)
+        goto user_found;
+    }
----------------
Looks like we probably want to use `MachineRegisterInfo::hasOneNonDBGUser(Register RegNo)` here. Hopefully that lets us get rid of the `goto` ;)


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D113230/new/

https://reviews.llvm.org/D113230



More information about the llvm-commits mailing list