On Wed, 21 Mar 2018, Tom de Vries wrote: > On 03/12/2018 01:14 PM, Richard Biener wrote: > > On Thu, 22 Feb 2018, Tom de Vries wrote: > > > I can > > > rework the bit of the patch that adds an assert after > > > canonicalize_loop_ivs > > > into a patch that aborts the optimization instead of ICE-ing. > > > > I think that's something reasonable anyway. > > > > Patch attached below implements that approach. > > The difference between before parloops, and after ompexpssa2 is this (showing > the effects of canonicalize_loop_ivs): > ... > $ diff -u pr83126.c.156t.dce5 pr83126.c.158t.ompexpssa2 > ... > ew (short unsigned int c9, int stuff) > { > int * fd; > @@ -9,53 +103,53 @@ > int _3; > short unsigned int _4; > unsigned int _5; > + unsigned int ivtmp_8; > unsigned int _22; > unsigned int ivtmp_24; > unsigned int ivtmp_26; > + unsigned int ivtmp_28; > > <bb 2> [local count: 11811]: > > <bb 3> [local count: 118111601]: > - # c9_1 = PHI <c9_11(D)(2), c9_21(11)> > + # c9_1 = PHI <c9_11(D)(2), c9_21(7)> > _2 = (long int) c9_1; > fd_13 = (int *) _2; > _3 = *fd_13; > > <bb 4> [local count: 1073741825]: > if (_3 != 0) > - goto <bb 6>; [11.00%] > + goto <bb 15>; [11.00%] > else > goto <bb 9>; [89.00%] > > <bb 9> [local count: 955630225]: > goto <bb 4>; [100.00%] > > - <bb 6> [local count: 118111600]: > + <bb 15> [local count: 94489281]: > > - <bb 10> [local count: 118111600]: > - > - <bb 5> [local count: 236258638]: > - # _22 = PHI <0(10), _5(8)> > - # c9_23 = PHI <c9_1(10), c9_14(8)> > - # e1_27 = PHI <0(10), e1_17(8)> > - # ivtmp_26 = PHI <2(10), ivtmp_24(8)> > + <bb 5> [local count: 189006911]: > + # c9_23 = PHI <c9_14(8), c9_1(15)> > + # e1_27 = PHI <e1_17(8), 0(15)> > + # ivtmp_8 = PHI <ivtmp_28(8), 0(15)> > + _22 = ivtmp_8; > + ivtmp_26 = 2 - ivtmp_8; > _4 = (short unsigned int) e1_27; > c9_14 = _4 * c9_23; > _5 = _22 + 1; > e1_17 = (int) _5; > ivtmp_24 = ivtmp_26 - 1; > - if (ivtmp_24 != 0) > + if (ivtmp_8 < 1) > goto <bb 8>; [66.67%] > else > goto <bb 7>; [33.33%] > > - <bb 8> [local count: 157513634]: > + <bb 8> [local count: 126010908]: > + ivtmp_28 = ivtmp_8 + 1; > goto <bb 5>; [100.00%] > > <bb 7> [local count: 78745004]: > # c9_21 = PHI <c9_14(5)> > - > - <bb 11> [local count: 78745004]: > goto <bb 3>; [100.00%] > > } > ... > > > Bootstrapped and reg-tested on x86_64. > > OK for stage4 trunk?
OK. Thanks, Richard.