On 7/17/2026 1:48 AM, wangjue wrote:
RISC-V enables -funroll-loops at -O2 for small-loop unrolling.  Keep
size-growing complete unrolling disabled unless unrolling is explicitly
requested.

gcc/ChangeLog:

        * config/riscv/riscv.cc (riscv_override_options_after_change): New
        function.
        (riscv_option_override): Call it.
        (TARGET_OVERRIDE_OPTIONS_AFTER_CHANGE): Define.

gcc/testsuite/ChangeLog:

        * gcc.target/riscv/unroll-explicit-attr-cunroll.c: New test.
        * gcc.target/riscv/unroll-small-loop-cunroll.c: New test.
Thanks.  I pushed this to the trunk after a final riscv32-elf and riscv64-elf test run.

jeff

Reply via email to