http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57251

Jakub Jelinek <jakub at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |jakub at gcc dot gnu.org

--- Comment #3 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
The problem seems to be that tracer and widening_mul passes happen very late
and there is no forwprop etc. afterwards.
WIDEN_MULT_EXPR expansion tries to avoid having op0 as constant:
if (TREE_CODE (treeop0) != INTEGER_CST)
but that isn't good enough here, because treeop0 is not INTEGER_CST, but it
expands into const0_rtx, which has VOIDmode and thus isn't really desirable for
expand_widening_mult or I guess the [su]mul_widen_optab expand_binop
OPTAB_LIB_WIDEN with expand_mult_highpart_adjust afterwards.
I guess we'll need to after expand_operands or expand_normal in those ifs check
for VOIDmode op0 and handle those somehow (if op1 isn't VOIDmode, perhaps swap
the operands, if both are VOIDmode, zero or sign extend both into the wider
mode and evaluate at compile time)?  BTW, is
                    op1 = convert_modes (innermode, mode,
                                         expand_normal (treeop1), unsignedp);
correct?  I mean, unsignedp is the TYPE_UNSIGNED of the result type, but don't
we want here TYPE_UNSIGNED (TREE_TYPE (treeop1)) instead?

Reply via email to