On Thu, Aug 1, 2019 at 4:48 AM Kito Cheng <kito.ch...@sifive.com> wrote: > gcc/ChangeLog > * config/riscv/riscv.c (riscv_promote_function_mode): New. > (TARGET_PROMOTE_FUNCTION_MODE): Use riscv_promote_function_mode. > gcc/testsuite/ChangeLog > * gcc.target/riscv/promote-type-for-libcall.c: New.
Yes, this looks correct to me, though I couldn't get the testcase to fail until I thought to try gcc-8.3. It turns out that gcc-9 optimizes away the __floatsidf2 calls, and that prevents the bug from triggering. The bug fix is still right though and should still go in. It failure is just a little harder to trigger than expected. > +/* Implement TARGET_PROMOTE_FUNCTION_MODE */ Missing a period at the end of the sentence, and the second space before the comment close. The MIPS port has the same comment typo as you copied it from there. You can fix the typo in the MIPS port too if you want. Jim