https://gcc.gnu.org/bugzilla/show_bug.cgi?id=27479

--- Comment #6 from GCC Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Vijay Telidevulapalli
<[email protected]>:

https://gcc.gnu.org/g:fa37f57173e247d274139a69a2ceb37a26041f9c

commit r17-4608-gfa37f57173e247d274139a69a2ceb37a26041f9c
Author: Vijay Shankar <[email protected]>
Date:   Wed Aug 26 15:49:01 2026 -0500

    rs6000: Optimize TLS access with combine patterns [PR27479]

    Reduce TLS variable access from 3 to 2 instructions by adding
    combine patterns that merge address calculation with load.

    Before
            addis 9,13,x@tprel@ha
            addi 9,9,x@tprel@l
            lwz 3,0(9)

    After
            addis 9,13,x@tprel@ha
            lwz 3,x@tprel@l(9)

    Bootstrapped and tested on powerpc64le-linux-gnu with no regressions.
    Bootstrapped and tested on powerpc64-linux-gnu with no regressions.

    2026-04-15  Vijay Shankar  <[email protected]>

    gcc/ChangeLog:
            PR target/27479
            * config/rs6000/rs6000.md (tprel_ld_<az>_<HSI:mode>): New pattern.
            (tprel_ld_QI_signed): likewise.
            (tprel_ld_QI): likewise.
            (tprel_ld_DI): likewise.
            (tprel_ld_<SFDF:mode>): likewise.

    gcc/testsuite/ChangeLog:
            PR target/27479
            * gcc.target/powerpc/pr27479.c: New Test.

Reply via email to