On Tue, Aug 11, 2015 at 2:50 PM, Richard Biener <richard.guent...@gmail.com> wrote: > On Fri, Aug 7, 2015 at 10:43 AM, Hurugalawadi, Naveen > <naveen.hurugalaw...@caviumnetworks.com> wrote: >> Hi, >> >>>> extend it - it should also work for non-INTEGER_CST >>>> divisors and it should work for any kind of division, not just exact_div. >> >> Please find attached the patch "pr25529.patch" that implements the pattern >> for all divisors >> >> Please review and let me know if its okay. > > Ok.
Err, sorry. You are missing a ANY_INTEGRAL_TYPE_P (type) before the TYPE_OVERFLOW_UNDEFINED check which should simply operate on 'type' rather than TREE_TYPE (@0). Ok with that changes. Richard. > Thanks, > Richard. > >> Regression tested on AARH64 and x86_64. >> >> Thanks, >> Naveen >> >> 2015-08-07 Naveen H.S <naveen.hurugalaw...@caviumnetworks.com> >> >> PR middle-end/25529 >> >> gcc/ChangeLog: >> * match.pd (div (mult @0 @1) @1) : New simplifier. >>