This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug tree-optimization/57251] [4.8/4.9 Regression] ICE in optab_handler, at optabs.h:258


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?


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]