[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:46:05 PDT 2025


================
@@ -0,0 +1,14 @@
+# RUN: llvm-mc -filetype=obj -triple x86_64 --x86-align-branch-boundary=32 --x86-align-branch=fused+jcc %s | llvm-objdump -d --no-show-raw-insn - | FileCheck %s
+
+# Exercise the case where fused instructions need to be aligned,
+# ensuring fusion is not broken by a NOP
+
+        .globl  f
+f:
+        .nops 27
----------------
MaskRay wrote:

The test seems to pass even without the change.

https://github.com/llvm/llvm-project/pull/155316


More information about the llvm-commits mailing list