https://gcc.gnu.org/bugzilla/show_bug.cgi?id=120263
Vineet Gupta <vineetg at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Keywords| |wrong-code
Target| |riscv
--- Comment #1 from Vineet Gupta <vineetg at gcc dot gnu.org> ---
RISC-V TARGET_MODE_AFTER seems to handle this case but is transitioning to
wrong state and missing out in generating the restore.
Preliminary patch which fixes the test is
@@ -12438,7 +12438,7 @@ riscv_frm_mode_after (rtx_insn *insn, int mode)
return mode;
if (frm_unknown_dynamic_p (insn))
- return riscv_vector::FRM_DYN;
+ return riscv_vector::FRM_DYN_EXIT;