This is the mail archive of the
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: <email@example.com>
On Thu, Aug 1, 2019 at 4:48 AM Kito Cheng <firstname.lastname@example.org> wrote:
> * config/riscv/riscv.c (riscv_promote_function_mode): New.
> (TARGET_PROMOTE_FUNCTION_MODE): Use riscv_promote_function_mode.
> * 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.