[llvm] [MC][RISCV][LoongArch] Add AlignFragment size if layout is available and not need insert nops (PR #76552)

Lu Weining via llvm-commits llvm-commits at lists.llvm.org
Fri Dec 29 01:08:32 PST 2023


================
@@ -64,8 +56,7 @@
 .word  .L2 - .L1
 .dword .L2 - .L1
 ## With relaxation, emit relocs because of the .align making the diff variable.
-## TODO Handle alignment directive. Why they emit relocs now? They returns
-## without folding symbols offset in AttemptToFoldSymbolOffsetDifference().
+## TODO Handle alignment directive.
----------------
SixWeining wrote:

- I think the comment `## With relaxation, emit relocs because of the .align making the diff variable.` should be changed to `## With relaxation, emit relocs because the la.pcrel makes the diff variable.` And this comment should be placed at line 64.
- Why the comment `## TODO Handle alignment directive.` is still here? Aren't this PR address the `TODO`?

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


More information about the llvm-commits mailing list