[llvm] [X86] Fix incorrect NOP insertion between fused instructions that breaks macro fusion (PR #155316)
Fangrui Song via llvm-commits
llvm-commits at lists.llvm.org
Tue Aug 26 21:49:04 PDT 2025
================
@@ -520,7 +520,19 @@ void X86AsmBackend::emitInstructionBegin(MCObjectStreamer &OS,
if (!canPadInst(Inst, OS))
return;
- if (PendingBA && PendingBA->getNext() == OS.getCurrentFragment()) {
+ if (PendingBA) {
+ auto *NextFragment = PendingBA->getNext();
+ assert(NextFragment && "NextFragment should not be null");
+
----------------
MaskRay wrote:
delete this blank line
https://github.com/llvm/llvm-project/pull/155316
More information about the llvm-commits
mailing list