Re: [PATCH] Improve tree_expr_nonnegative_p by using the ranger [PR111959]

2023-10-27 Thread Richard Biener
On Thu, Oct 26, 2023 at 8:30 PM Andrew Pinski wrote: > > On Thu, Oct 26, 2023 at 2:29 AM Richard Biener > wrote: > > > > On Wed, Oct 25, 2023 at 5:51 AM Andrew Pinski wrote: > > > > > > I noticed we were missing optimizing `a / (1 << b)` when > > > we know that a is nonnegative but only due to r

Re: [PATCH] Improve tree_expr_nonnegative_p by using the ranger [PR111959]

2023-10-26 Thread Andrew Pinski
On Thu, Oct 26, 2023 at 2:29 AM Richard Biener wrote: > > On Wed, Oct 25, 2023 at 5:51 AM Andrew Pinski wrote: > > > > I noticed we were missing optimizing `a / (1 << b)` when > > we know that a is nonnegative but only due to ranger information. > > This adds the use of the global ranger to tree_

Re: [PATCH] Improve tree_expr_nonnegative_p by using the ranger [PR111959]

2023-10-26 Thread Mikael Morin
Le 26/10/2023 à 11:29, Richard Biener a écrit : On Wed, Oct 25, 2023 at 5:51 AM Andrew Pinski wrote: diff --git a/gcc/fold-const.cc b/gcc/fold-const.cc index 40767736389..2a2a90230f5 100644 --- a/gcc/fold-const.cc +++ b/gcc/fold-const.cc @@ -15047,15 +15047,33 @@ tree_single_nonnegative_warnv_p

Re: [PATCH] Improve tree_expr_nonnegative_p by using the ranger [PR111959]

2023-10-26 Thread Richard Biener
On Wed, Oct 25, 2023 at 5:51 AM Andrew Pinski wrote: > > I noticed we were missing optimizing `a / (1 << b)` when > we know that a is nonnegative but only due to ranger information. > This adds the use of the global ranger to tree_single_nonnegative_warnv_p > for SSA_NAME. > I didn't extend tree_s

[PATCH] Improve tree_expr_nonnegative_p by using the ranger [PR111959]

2023-10-24 Thread Andrew Pinski
I noticed we were missing optimizing `a / (1 << b)` when we know that a is nonnegative but only due to ranger information. This adds the use of the global ranger to tree_single_nonnegative_warnv_p for SSA_NAME. I didn't extend tree_single_nonnegative_warnv_p to use the ranger for floating point nor