On Thu, 2023-11-23 at 16:13 +0800, chenglulu wrote:
> The fix_truncv4sfv4si2 template is indeed called when debugging with
> gdb.
>
> So I think we can use define_expand here.
The problem is cases where we want to combine an rint call with float-
to-int conversion:
float x[4];
int y[4];
void test()
{
for (int i = 0; i < 4; i++)
y[i] = __builtin_rintf(x[i]);
}
With define_expand we get "vfrint + vftintrz", but with define_insn we
get a single "vftint".
Arguably the generic code should try to handle this (PR86609), but it's
"not sure if that's a good idea in general" (comment 1 in the PR) so we
can do this in a target-specific way.
--
Xi Ruoyao <[email protected]>
School of Aerospace Science and Technology, Xidian University