[llvm] [SystemZ] Mark RELOC_NONE as not having size for SystemZ (PR #167027)

Daniel Thornburgh via llvm-commits llvm-commits at lists.llvm.org
Fri Nov 7 14:14:48 PST 2025


https://github.com/mysterymath created https://github.com/llvm/llvm-project/pull/167027

This fixes forward an issue in PR #147427.

>From e4e1fa92f7398291eaf925597ff5904449440003 Mon Sep 17 00:00:00 2001
From: Daniel Thornburgh <dthorn at google.com>
Date: Fri, 7 Nov 2025 14:10:54 -0800
Subject: [PATCH] Mark RELOC_NONE as not having size for SystemZ

This fixes forward an issue in PR #147427.
---
 llvm/lib/Target/SystemZ/SystemZLongBranch.cpp | 1 +
 1 file changed, 1 insertion(+)

diff --git a/llvm/lib/Target/SystemZ/SystemZLongBranch.cpp b/llvm/lib/Target/SystemZ/SystemZLongBranch.cpp
index 21a233b2ffa1d..b7a93e7babefe 100644
--- a/llvm/lib/Target/SystemZ/SystemZLongBranch.cpp
+++ b/llvm/lib/Target/SystemZ/SystemZLongBranch.cpp
@@ -216,6 +216,7 @@ static unsigned getInstSizeInBytes(const MachineInstr &MI,
           MI.isDebugOrPseudoInstr() || MI.isPosition() || MI.isKill() ||
           MI.isImplicitDef() || MI.getOpcode() == TargetOpcode::MEMBARRIER ||
           MI.getOpcode() == TargetOpcode::INIT_UNDEF || MI.isFakeUse() ||
+          MI.getOpcode() == TargetOpcode::RELOC_NONE ||
           // These have a size that may be zero:
           MI.isInlineAsm() || MI.getOpcode() == SystemZ::STACKMAP ||
           MI.getOpcode() == SystemZ::PATCHPOINT ||



More information about the llvm-commits mailing list