[llvm] BPF: Remove unnecessary isReg check for copy source (PR #208486)

Matt Arsenault via llvm-commits llvm-commits at lists.llvm.org
Thu Jul 9 08:23:47 PDT 2026


https://github.com/arsenm created https://github.com/llvm/llvm-project/pull/208486

None

>From ac41056085720c352773f1edf7744b9b45179a77 Mon Sep 17 00:00:00 2001
From: Matt Arsenault <Matthew.Arsenault at amd.com>
Date: Thu, 9 Jul 2026 17:23:05 +0200
Subject: [PATCH] BPF: Remove unnecessary isReg check for copy source

---
 llvm/lib/Target/BPF/BPFMIPeephole.cpp | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/llvm/lib/Target/BPF/BPFMIPeephole.cpp b/llvm/lib/Target/BPF/BPFMIPeephole.cpp
index 675b1118d5c9e..c6fa0bf6d23bc 100644
--- a/llvm/lib/Target/BPF/BPFMIPeephole.cpp
+++ b/llvm/lib/Target/BPF/BPFMIPeephole.cpp
@@ -96,9 +96,6 @@ bool BPFMIPeephole::isCopyFrom32Def(MachineInstr *CopyMI)
 {
   MachineOperand &opnd = CopyMI->getOperand(1);
 
-  if (!opnd.isReg())
-    return false;
-
   // Return false if getting value from a 32bit physical register.
   // Most likely, this physical register is aliased to
   // function call return value or current function parameters.



More information about the llvm-commits mailing list