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

Vineet Gupta <vineetg at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         Resolution|---                         |FIXED
             Status|NEW                         |RESOLVED
                 CC|                            |vineetg at gcc dot gnu.org

--- Comment #3 from Vineet Gupta <vineetg at gcc dot gnu.org> ---
This is fixed with following commit (and will make it into gcc-14)

commit b41d7eb0e14785ff0ad6e6922cbd4c880e680bf9
Author: Vineet Gupta <vine...@rivosinc.com>
Date:   Mon Aug 7 13:45:29 2023 -0700

    RISC-V: Enable Hoist to GCSE simple constants

    Hoist want_to_gcse_p () calls rtx_cost () to compute max distance for
    hoist candidates. For a simple const (say 6 which needs seperate insn "LI
6")
    backend currently returns 0, causing Hoist to bail and elide GCSE.

    Note that constants requiring more than 1 insns to setup were working
    fine since riscv_rtx_costs () was returning non-zero (although that
    itself might need refining: see bugzilla 111139).

    To keep testsuite parity, some V tests need updating which started failing
    in the new costing regime.

Reply via email to