]> git.ipfire.org Git - thirdparty/gcc.git/commit
RISC-V: Allow different dynamic floating point mode to be merged [PR119832]
authorKito Cheng <kito.cheng@sifive.com>
Tue, 29 Apr 2025 03:35:00 +0000 (11:35 +0800)
committerKito Cheng <kito.cheng@sifive.com>
Wed, 30 Apr 2025 09:27:21 +0000 (17:27 +0800)
commite5d1f538bb7d2c7a7a4acf4a4516fa8933dc2888
treec703392c4cb90894b0652ee45d406e349d85f1bc
parenta992164c2899735525a7a267654473b7e527ef0d
RISC-V: Allow different dynamic floating point mode to be merged [PR119832]

Although we already try to set the mode needed to FRM_DYN after a function call,
there are still some corner cases where both FRM_DYN and FRM_DYN_CALL may appear
on incoming edges.

Therefore, we use TARGET_MODE_CONFLUENCE to tell GCC that FRM_DYN, FRM_DYN_CALL,
and FRM_DYN_EXIT modes are compatible.

gcc/ChangeLog:

PR target/119832
* config/riscv/riscv.cc (riscv_dynamic_frm_mode_p): New.
(riscv_mode_confluence): New.
(TARGET_MODE_CONFLUENCE): Define to riscv_mode_confluence.

gcc/testsuite/ChangeLog:

PR target/119832
* g++.target/riscv/pr119832.C: New test.
gcc/config/riscv/riscv.cc
gcc/testsuite/g++.target/riscv/pr119832.C [new file with mode: 0644]