Message ID | 20160627181829.GR7387@tucnak.redhat.com |
---|---|
State | New |
Headers | show |
On Mon, 27 Jun 2016, Jakub Jelinek wrote: > Hi! > > On targets which don't support sub-word operations trying OPTAB_DIRECT > AND on e.g. QImode or HImode leads to NULL being returned, so we ICE on > builtin-arith-overflow-p-19.c e.g. on arm, aarch64 or sparc*. > > Fixed thusly, bootstrapped/regtested on x86_64-linux and i686-linux, tested > with cross-compiler on the testcase, ok for trunk? Ok. Richard. > 2016-06-27 Jakub Jelinek <jakub@redhat.com> > > PR rtl-optimization/71673 > * internal-fn.c (expand_arith_overflow_result_store): Use > OPTAB_LIB_WIDEN instead of OPTAB_DIRECT as last argument to > expand_simple_binop. > > --- gcc/internal-fn.c.jj 2016-06-24 13:01:58.000000000 +0200 > +++ gcc/internal-fn.c 2016-06-27 13:38:25.753237581 +0200 > @@ -454,7 +454,7 @@ expand_arith_overflow_result_store (tree > = immed_wide_int_const (wi::shifted_mask (0, prec, false, tgtprec), > tgtmode); > lres = expand_simple_binop (tgtmode, AND, res, mask, NULL_RTX, > - true, OPTAB_DIRECT); > + true, OPTAB_LIB_WIDEN); > } > else > { > > Jakub > >
--- gcc/internal-fn.c.jj 2016-06-24 13:01:58.000000000 +0200 +++ gcc/internal-fn.c 2016-06-27 13:38:25.753237581 +0200 @@ -454,7 +454,7 @@ expand_arith_overflow_result_store (tree = immed_wide_int_const (wi::shifted_mask (0, prec, false, tgtprec), tgtmode); lres = expand_simple_binop (tgtmode, AND, res, mask, NULL_RTX, - true, OPTAB_DIRECT); + true, OPTAB_LIB_WIDEN); } else {