Re: [PATCH] More NEGATE_EXPR folding in match.pd

2021-09-09 Thread Richard Biener via Gcc-patches
On Thu, Sep 9, 2021 at 12:08 PM Roger Sayle wrote: > > > As observed by Jakub in comment #2 of PR 98865, the expression -(a>>63) > is optimized in GENERIC but not in GIMPLE. Investigating further it > turns out that this is one of a few transformations performed by > fold_negate_expr in fold-cons

Re: [PATCH] More NEGATE_EXPR folding in match.pd

2021-09-09 Thread Prathamesh Kulkarni via Gcc-patches
On Thu, 9 Sept 2021 at 15:38, Roger Sayle wrote: > > > As observed by Jakub in comment #2 of PR 98865, the expression -(a>>63) > is optimized in GENERIC but not in GIMPLE. Investigating further it > turns out that this is one of a few transformations performed by > fold_negate_expr in fold-const.

[PATCH] More NEGATE_EXPR folding in match.pd

2021-09-09 Thread Roger Sayle
As observed by Jakub in comment #2 of PR 98865, the expression -(a>>63) is optimized in GENERIC but not in GIMPLE. Investigating further it turns out that this is one of a few transformations performed by fold_negate_expr in fold-const.c that aren't yet performed by match.pd. This patch moves/dup