[Bug target/82981] [7/8 Regression] unnecessary __multi3 call for mips64r6 linux kernel
jakub at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Tue Nov 14 10:13:00 GMT 2017
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82981
--- Comment #3 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
That might not be that easy without repeating there big chunks of internal-fn.c
stuff.
In any case, what is mips64r6 using?
From the above it seems it doesn't have a corresponding optab, so
if (icode == CODE_FOR_nothing)
is true. Thus, is it:
if (GET_MODE_2XWIDER_MODE (mode).exists (&wmode)
&& targetm.scalar_mode_supported_p (wmode))
or
else if (int_mode_for_size (prec / 2, 1).exists (&hmode)
&& 2 * GET_MODE_PRECISION (hmode) == prec)
or the fallback case that doesn't report overflow:
else
{
gcc_assert (!is_ubsan);
ops.code = MULT_EXPR;
ops.type = type;
res = expand_expr_real_2 (&ops, NULL_RTX, mode, EXPAND_NORMAL);
emit_jump (done_label);
}
? If it is the first one from these, perhaps we should have some extra checks
there whether WIDEN_MULT_EXPR will be emitted as a library call or not.
Though, if mips64r6 has hipart multiplication, I don't see why it couldn't
handle the widening multiplication by performing normal DImode multiplication
plus highpart DImode multiplication or something similar.
More information about the Gcc-bugs
mailing list