[llvm] [MC] Fix quadratic runtime within alignment boundary fragment relaxation (PR #176535)

Fangrui Song via llvm-commits llvm-commits at lists.llvm.org
Mon Mar 2 21:49:54 PST 2026


================
@@ -0,0 +1,28 @@
+// REQUIRES: asserts
+// Test that sections containing large amounts of branches with alignment
+// constraints do not cause quadratic relaxation blowup.
+
+// RUN: llvm-mc -filetype=obj -triple x86_64 --stats -o %t \
+// RUN:   --x86-align-branch-boundary=8 --x86-align-branch=call %s 2>&1 \
+// RUN: | FileCheck %s
+// CHECK: 1 assembler         - Number of assembler layout and relaxation steps
+
+// RUN: llvm-objdump -d --no-show-raw-insn %t \
----------------
MaskRay wrote:

Don't unnecessarily wrap `llvm-objdump | FileCheck` to two lines

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


More information about the llvm-commits mailing list