[PATCH] D62006: Add "llvm_unreachable" for function RegisterBankInfo::getRegBank

Quentin Colombet via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu May 30 09:30:07 PDT 2019


qcolombet reopened this revision.
qcolombet added inline comments.
This revision is now accepted and ready to land.


================
Comment at: llvm/lib/CodeGen/GlobalISel/RegisterBankInfo.cpp:96
+  llvm_unreachable("RegClassOrBank is either a const RegisterBank* or "
+                   "a const TargetRegisterClass*");
 }
----------------
Sorry for the late reply but that doesn't seem right.

Yes, RegClassOrRegBank is of one of the two classes, but it can still be nullptr, e.g., before regbankselect. Therefore this case seems reachable to me.

What am I missing?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D62006





More information about the llvm-commits mailing list