[PATCH] D151406: [Hexagon] Check if register is non-null before calling subregs_inclusive

Sergei Barannikov via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sun Jun 4 02:40:25 PDT 2023


This revision was landed with ongoing or failed builds.
This revision was automatically updated to reflect the committed changes.
Closed by commit rGc37e6a269ef3: [Hexagon] Check if register is non-null before calling subregs_inclusive (authored by barannikov88).

Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D151406

Files:
  llvm/lib/Target/Hexagon/HexagonFrameLowering.cpp


Index: llvm/lib/Target/Hexagon/HexagonFrameLowering.cpp
===================================================================
--- llvm/lib/Target/Hexagon/HexagonFrameLowering.cpp
+++ llvm/lib/Target/Hexagon/HexagonFrameLowering.cpp
@@ -307,6 +307,9 @@
           return true;
         if (MO.isReg()) {
           Register R = MO.getReg();
+          // Debug instructions may refer to $noreg.
+          if (!R)
+            continue;
           // Virtual registers will need scavenging, which then may require
           // a stack slot.
           if (R.isVirtual())


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D151406.528195.patch
Type: text/x-patch
Size: 569 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230604/abfbca86/attachment.bin>


More information about the llvm-commits mailing list