On Tue, Jan 08, 2019 at 01:52:35PM +0100, Jakub Jelinek wrote:
> > 2019-01-08  Martin Liska  <mli...@suse.cz>
> > 
> >     PR tree-optimization/88753
> >     * tree-switch-conversion.c (switch_conversion::build_one_array):
> >     Come up with local variable constructor.  Convert first to
> >     type of constructor values.
> 
> Why is the testcase missing?

Oh, one more thing.  What happens if the index is wider (higher precision)
than the type of the constructor elts?  At least for the two_value_replacement
optimization in phiopt, I'm using the wider of the two types for the
arithmetics (conditionally unsigned if not proven not to overflow).
Shouldn't that be the case in this optimization too?

With using just the constructor elt type, do you count on the analysis to
fail if starting with casting the index to the elt type (or unsigned variant
thereof) affects the computation?

        Jakub

Reply via email to