[PATCH] D65554: Prevent vregs leaking into the MC layer via TargetRegisterClass::contains()

Matt Arsenault via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jul 31 20:53:44 PDT 2019


arsenm added inline comments.


================
Comment at: llvm/include/llvm/CodeGen/TargetRegisterInfo.h:90-91
   bool contains(unsigned Reg) const {
+    if (!Register::isPhysicalRegister(Reg))
+      return false;
     return MC->contains(Reg);
----------------
I think this should be a hard assert. Any of the users of this almost certainly do not intend to reach this


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D65554





More information about the llvm-commits mailing list