On Thu, Jan 26, 2017 at 05:33:18PM +0100, Jakub Jelinek wrote: > On Thu, Jan 26, 2017 at 05:11:27PM +0100, Dominik Vogt wrote: > > The patch fixes the s390x crash reported in PR 79240: > > https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79240 > > Regression tested and bootstrapped on s390x biarch and s390. > > > gcc/ChangeLog-pr79240 > > > > PR target/79240 > > * config/s390/s390.c (s390_extzv_shift_ok): Returns false, don't assert. > > * config/s390/s390.md ("*r<noxa>sbg_<mode>_srl_bitmask") > > ("*r<noxa>sbg_<mode>_sll_bitmask") > > ("*extzv_<mode>_srl<clobbercc_or_nocc>") > > ("*extzv_<mode>_sll<clobbercc_or_nocc>"): > > Use contiguous_bitmask_nowrap_operand > > gcc/testsuite/ChangeLog-pr79240 > > > > * gcc.target/s390/pr79240.c: New test. > > > diff --git a/gcc/config/s390/s390.c b/gcc/config/s390/s390.c > > index fe65846..b1dfbfa 100644 > > --- a/gcc/config/s390/s390.c > > +++ b/gcc/config/s390/s390.c > > @@ -2472,7 +2472,8 @@ s390_extzv_shift_ok (int bitsize, int rotl, unsigned > > HOST_WIDE_INT contig) > > bool ok; > > > > ok = s390_contiguous_bitmask_nowrap_p (contig, bitsize, &start, &end); > > - gcc_assert (ok); > > + if (!ok) > > + return false; > > If the predicates are supposed to ensure it, then I think the assert is > fine.
Is it guaranteed that the predicate conditions are evaluated before executing the conditions? Ciao Dominik ^_^ ^_^ -- Dominik Vogt IBM Germany