Re: [PATCH] Fix PR23471

2016-03-31 Thread Richard Biener
On Thu, Mar 31, 2016 at 12:12 PM, Hurugalawadi, Naveen wrote: >>> With -O1 there is -fno-strict-overflow in effect which is not >>> TYPE_OVERFLOW_UNDEFINED. > > Thanks for the details. The below code has the following condition > and hence not working for O1. > if (FLOAT_TYPE_P (type) || TYPE_OVER

Re: [PATCH] Fix PR23471

2016-03-31 Thread Hurugalawadi, Naveen
>> With -O1 there is -fno-strict-overflow in effect which is not >> TYPE_OVERFLOW_UNDEFINED. Thanks for the details. The below code has the following condition and hence not working for O1. if (FLOAT_TYPE_P (type) || TYPE_OVERFLOW_UNDEFINED (type)) Then PR23471 is fixed with the current sources.

Re: [PATCH] Fix PR23471

2016-03-31 Thread Richard Biener
On Thu, Mar 31, 2016 at 11:55 AM, Hurugalawadi, Naveen wrote: >>> Er, the code just below your patch should already handle this case, no? > > Hi, > > Thanks for the review and your comments on the patch. > > The code below seems to handle this case for O2 or higher optimization. > > However, someh

Re: [PATCH] Fix PR23471

2016-03-31 Thread Hurugalawadi, Naveen
>> Er, the code just below your patch should already handle this case, no? Hi, Thanks for the review and your comments on the patch. The code below seems to handle this case for O2 or higher optimization. However, somehow its not being handled with O1 and hence has this implemented for better o

Re: [PATCH] Fix PR23471

2016-03-31 Thread Marc Glisse
On Thu, 31 Mar 2016, Hurugalawadi, Naveen wrote: Please find attached the patch that fixes the tree optimization 23471. Please review the patch and let me know if its okay? Regression tested on X86_64. Thanks, Naveen 2016-03-31 Naveen H.S * fold-const.c (tree_binary_nonnegative_wa

[PATCH] Fix PR23471

2016-03-31 Thread Hurugalawadi, Naveen
Hi, Please find attached the patch that fixes the tree optimization 23471. Please review the patch and let me know if its okay? Regression tested on X86_64. Thanks, Naveen 2016-03-31 Naveen H.S * fold-const.c (tree_binary_nonnegative_warnv_p) : Handle the case a * a; where