Skip to content

[pull] main from llvm:main - #1705

Merged
pull[bot] merged 4 commits into
MPACT-ORG:mainfrom
llvm:main
Aug 2, 2026
Merged

[pull] main from llvm:main#1705
pull[bot] merged 4 commits into
MPACT-ORG:mainfrom
llvm:main

Conversation

@pull

@pull pull Bot commented Aug 2, 2026

Copy link
Copy Markdown

See Commits and Changes for more details.


Created by pull[bot] (v2.0.0-alpha.4)

Can you help keep this open source service alive? 💖 Please sponsor : )

marcauberer and others added 4 commits August 2, 2026 10:32
C++17 guarantees the postfix-expression naming the called function is
sequenced before evaluation of its arguments, so
L->linkPhase1(std::move(L)) is well-formed without the LTmp indirection.
This should also be implemented by MSVC now. See here (P0145R3 and
P0400R0):

https://learn.microsoft.com/ar-sa/cpp/overview/visual-cpp-language-conformance?view=msvc-170
Disclaimer: As I have no LLVM Windows machine with MSVC at hand, I was
not able to test it myself.

Co-authored-by: Claude <noreply@anthropic.com>
A PIC data reference forms the symbol's GOT offset with
R_SPARC_GOTDATA_OP_HIX22 and R_SPARC_GOTDATA_OP_LOX10 and loads through
it, with R_SPARC_GOTDATA_OP marking the load:

```
sethi %gdop_hix22(sym), %g1
xor   %g1, %gdop_lox10(sym), %g1
ldx   [%l7 + %g1], %g1, %gdop(sym)
```

When the symbol is neither preemptible nor absolute, optimize the load
to `add %l7, %g1, %g1` over the symbol's GOT-relative address. An
absolute symbol keeps the GOT load, as it can be arbitrarily far from
.got and we don't want the X86_64::relaxOpt complexity.

Co-authored-by: Kirill A. Korinsky <kirill@korins.ky>
Co-authored-by: LemonBoy <thatlemon@gmail.com>
Co-authored-by: Alex Rønne Petersen <alex@alexrp.com>
…over loops) (#204327)

This path transforms `vector.contract(A, B, Acc)` into
`vector.contract(A, B, 0) + Acc` to decouple the contraction computation
from the accumulator update for contractions over the loop.
An initial-exec reference loads the symbol's TP-relative offset from the
GOT and adds the thread pointer:

```
sethi %tie_hi22(sym), %o0             # R_SPARC_TLS_IE_HI22
add   %o0, %tie_lo10(sym), %o0        # R_SPARC_TLS_IE_LO10
ldx   [%l7 + %o0], %o0, %tie_ldx(sym) # R_SPARC_TLS_IE_LDX
add   %g7, %o0, %o0, %tie_add(sym)    # R_SPARC_TLS_IE_ADD
```

The sethi and add form the GOT offset. In an executable a
non-preemptible symbol is optimized to Local Exec, as GNU ld does: the
sethi holds the complement, the add becomes an xor, and the load becomes
a register move, or a nop when source and destination are the same. The
thread pointer add is unchanged.

Co-authored-by: Kirill A. Korinsky <kirill@korins.ky>
Co-authored-by: LemonBoy <thatlemon@gmail.com>
Co-authored-by: Alex Rønne Petersen <alex@alexrp.com>
@pull pull Bot locked and limited conversation to collaborators Aug 2, 2026
@pull
pull Bot requested a review from aartbik as a code owner August 2, 2026 05:55
@pull pull Bot added the ⤵️ pull label Aug 2, 2026
@pull
pull Bot merged commit 4e0d78f into MPACT-ORG:main Aug 2, 2026
6 of 8 checks passed
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants