On Fri, Jan 22, 2016 at 09:43:52AM +0000, Richard Sandiford wrote: > gcc/ > PR tree-optimization/69400 > * wide-int.cc (wi_pack): Take the precision as argument and > perform canonicalization here rather than in the callers. > Use the main loop to handle all full-width HWIs. Add a > zero HWI if in_len isn't a full result. > (wi::divmod_internal): Update accordingly. > (wi::mul_internal): Likewise. Simplify. > > gcc/testsuite/ > PR tree-optimization/69400 > * gcc.dg/plugin/wide-int_plugin.c (test_wide_int_mod_trunc): New > function. > (plugin_init): Call it.
I'd prefer to see also the testcase from the PR in the testsuite in addition to the unit test. Just make it /* { dg-do run { target int128 } } */ and put into gcc.dg/torture/ > --- a/gcc/wide-int.cc > +++ b/gcc/wide-int.cc > @@ -1215,29 +1215,31 @@ wi_unpack (unsigned HOST_HALF_WIDE_INT *result, const > HOST_WIDE_INT *input, > } > > /* The inverse of wi_unpack. IN_LEN is the the number of input I know you haven't touched this line and it is preexisting, but when touching this, please also fix the "the the". Ok with those changes. Jakub