This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] RISC-V: Promote type correctly for libcalls
- From: Jim Wilson <jimw at sifive dot com>
- To: Kito Cheng <kito dot cheng at sifive dot com>
- Cc: GCC Patches <gcc-patches at gcc dot gnu dot org>, Kito Cheng <kito dot cheng at gmail dot com>
- Date: Thu, 1 Aug 2019 21:25:43 -0700
- Subject: Re: [PATCH] RISC-V: Promote type correctly for libcalls
- References: <1564660110-29983-1-git-send-email-kito.cheng@sifive.com>
On Thu, Aug 1, 2019 at 4:48 AM Kito Cheng <kito.cheng@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