On 7/15/2026 8:34 AM, Luke Zhuang wrote:
From: "Luke Zhuang" <[email protected]>

An LRA crashing is found by fuzz-testing, and is triggered by
<0748d2c83fc>. We can avoid it by replacing RVVM8QI with RVVM1QI,
and may need to fix the LRA later.

A reduced test is appended as well, demonstrating the crash.

gcc/ChangeLog:

        * config/riscv/riscv.md (@tlsdesc<mode>): Use individual
        RVVM1QI clobbers instead of four RVVM8QI.

gcc/testsuite/ChangeLog:

        * gcc.target/riscv/tlsdesc_clobber_lra.c: New test.

Co-authored-by: Kito Cheng <[email protected]>
Thanks.  We can go with this version, though I strongly suspect the real bug is in LRA; though it's not immediately obvious what.  I wouldn't expect that function to need spilling or vector register usage in general, so it's unclear why is LRA is unhappy or why LRA works when you break the clobbers down into their components. Interestingly enough using LMUL4 clobbers works as well which cuts the clobber set to just 8 entries instead of 32.

Anyway, I'll push it momentarily.

jeff

Reply via email to