[llvm] [BPF] Do not allow gotol in the middle of asm insn (PR #144545)

via llvm-commits llvm-commits at lists.llvm.org
Tue Jun 17 08:16:48 PDT 2025


https://github.com/yonghong-song created https://github.com/llvm/llvm-project/pull/144545

Previously I accidentally allowed 'gotol' insn in the middle of asm insn ([1]). But actually 'gotol' is not allowed in the middle of any asm insn, so remove it from isValidIdInMiddle().

  [1] https://github.com/yonghong-song/llvm-project/commit/6c412b6c6faa2dabd8602d35d3f5e796fb1daf80

>From 18b1ac1b15b1bfd107c4a821cee10a9111ad07b0 Mon Sep 17 00:00:00 2001
From: Yonghong Song <yonghong.song at linux.dev>
Date: Tue, 17 Jun 2025 07:27:15 -0700
Subject: [PATCH] [BPF] Do not allow gotol in the middle of asm insn

Previously I accidentally allowed 'gotol' insn in the middle of
asm insn ([1]). But actually 'gotol' is not allowed in the middle
of any asm insn, so remove it from isValidIdInMiddle().

  [1] https://github.com/yonghong-song/llvm-project/commit/6c412b6c6faa2dabd8602d35d3f5e796fb1daf80
---
 llvm/lib/Target/BPF/AsmParser/BPFAsmParser.cpp | 1 -
 1 file changed, 1 deletion(-)

diff --git a/llvm/lib/Target/BPF/AsmParser/BPFAsmParser.cpp b/llvm/lib/Target/BPF/AsmParser/BPFAsmParser.cpp
index 139ac429dd135..7d1819134d162 100644
--- a/llvm/lib/Target/BPF/AsmParser/BPFAsmParser.cpp
+++ b/llvm/lib/Target/BPF/AsmParser/BPFAsmParser.cpp
@@ -261,7 +261,6 @@ struct BPFOperand : public MCParsedAsmOperand {
         .Case("bswap32", true)
         .Case("bswap64", true)
         .Case("goto", true)
-        .Case("gotol", true)
         .Case("ll", true)
         .Case("skb", true)
         .Case("s", true)



More information about the llvm-commits mailing list