Re: [PATCH, RFC] PR middle-end/55299, contract bitnot through ASR and rotations

2015-06-16 Thread Richard Biener
On Mon, Jun 15, 2015 at 12:14 PM, Mikhail Maltsev wrote: > Hi. > > The attached patch adds new match-and-simplify patterns, which fold > ~((~a) >> b) into (a >> b) for arithmetic shifts (i.e. when A is signed) > and perform similar folds for rotations. It also fixes PR > tree-optimization/54579 (b

[PATCH, RFC] PR middle-end/55299, contract bitnot through ASR and rotations

2015-06-15 Thread Mikhail Maltsev
Hi. The attached patch adds new match-and-simplify patterns, which fold ~((~a) >> b) into (a >> b) for arithmetic shifts (i.e. when A is signed) and perform similar folds for rotations. It also fixes PR tree-optimization/54579 (because we already fold (-a - 1) into ~a). A couple of questions: 1.