[all-commits] [llvm/llvm-project] b6688a: [MC] flushPendingLabels: revert setAtom change

Fangrui Song via All-commits all-commits at lists.llvm.org
Thu Jun 13 14:06:42 PDT 2024


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: b6688a0b17361e1f4164f52e8d3b17defd7d432d
      https://github.com/llvm/llvm-project/commit/b6688a0b17361e1f4164f52e8d3b17defd7d432d
  Author: Fangrui Song <i at maskray.me>
  Date:   2024-06-13 (Thu, 13 Jun 2024)

  Changed paths:
    M llvm/lib/MC/MCSection.cpp

  Log Message:
  -----------
  [MC] flushPendingLabels: revert setAtom change

The setAtom call introduced by e17bc023f4e5b79f08bfc7f624f8ff0f0cf17ce4
was due to my misunderstanding of flushPendingLabels
(see https://discourse.llvm.org/t/mc-removing-aligned-bundling-support/79518).

When evaluating `.quad x-y`,
MCExpr.cpp:AttemptToFoldSymbolOffsetDifference gives different results
at parse time and layout time because the `if (FA->getAtom() ==
FB.getAtom())` condition in isSymbolRefDifferenceFullyResolvedImpl only
works when `setAtom` with a non-null pointer has been called. Calling
setAtom in flushPendingLabels does not help anything.



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list