[llvm] [MC][RISCV] Check hasEmitNops before call shouldInsertExtraNopBytesForCodeAlign (PR #77236)
Fangrui Song via llvm-commits
llvm-commits at lists.llvm.org
Sun Jan 7 11:14:22 PST 2024
================
@@ -0,0 +1,29 @@
+# RUN: llvm-mc --filetype=obj --triple=riscv64 --mattr=+relax %s \
+# RUN: | llvm-readobj -r - | FileCheck --check-prefixes=CHECK,RELAX %s
+# RUN: llvm-mc --filetype=obj --triple=riscv64 --mattr=-relax %s \
+# RUN: | llvm-readobj -r - | FileCheck %s
+
+.section ".dummy", "a"
+.L1:
+ call func
+.p2align 3
+.L2:
+.dword .L2 - .L1
----------------
MaskRay wrote:
Keep just `.dword .L2 - .L1` and remove other data directives to make the example minimum.
https://github.com/llvm/llvm-project/pull/77236
More information about the llvm-commits
mailing list