From 4634d837f4a2ad5795ee8fea640059f05b6e32e7 Mon Sep 17 00:00:00 2001 From: liyunfei Date: Thu, 28 Aug 2025 20:42:49 +0800 Subject: [PATCH] [Propeller] bugfix for MachineBasicBlock hush set In some testcases x86 codegen might gen MBB with no BBID. Set hash for these MBB will cause assertion fail. --- llvm/lib/CodeGen/BasicBlockSections.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/llvm/lib/CodeGen/BasicBlockSections.cpp b/llvm/lib/CodeGen/BasicBlockSections.cpp index 9b985f9f0aff..6e58c8fb2946 100644 --- a/llvm/lib/CodeGen/BasicBlockSections.cpp +++ b/llvm/lib/CodeGen/BasicBlockSections.cpp @@ -319,7 +319,8 @@ void computeBBHash(MachineFunction &MF) { } } } - MBB.setHash(Hash); + if(MBB.getBBID()) + MBB.setHash(Hash); } } -- Gitee