Re: Location of "dg-final" directives? (was Re: [PATCH][GCC] Algorithmic optimization in match and simplify)

2015-09-02 Thread Andre Vieira
On 01/09/15 17:54, Marek Polacek wrote: On Tue, Sep 01, 2015 at 12:50:27PM -0400, David Malcolm wrote: I can't comment on the patch itself, but I noticed that in the testsuite addition, you've gathered all the "dg-final" clauses at the end. I think that this is consistent with existing practi

Re: Location of "dg-final" directives? (was Re: [PATCH][GCC] Algorithmic optimization in match and simplify)

2015-09-01 Thread Marek Polacek
On Tue, Sep 01, 2015 at 12:50:27PM -0400, David Malcolm wrote: > I can't comment on the patch itself, but I noticed that in the testsuite > addition, you've gathered all the "dg-final" clauses at the end. > > I think that this is consistent with existing practice in gcc, but > AFAIK, the dg-final

Location of "dg-final" directives? (was Re: [PATCH][GCC] Algorithmic optimization in match and simplify)

2015-09-01 Thread David Malcolm
On Fri, 2015-08-28 at 17:56 +0100, Andre Vieira wrote: [..snip..] > diff --git a/gcc/testsuite/gcc.dg/tree-ssa/forwprop-33.c > b/gcc/testsuite/gcc.dg/tree-ssa/forwprop-33.c > new file mode 100644 > index > ..984d8b37a01defe0e6852070a7dfa7ace5027c51 > --- /d

Re: [PATCH][GCC] Algorithmic optimization in match and simplify

2015-09-01 Thread Richard Biener
On Tue, Sep 1, 2015 at 3:40 PM, Andre Vieira wrote: > Hi Marc, > > On 28/08/15 19:07, Marc Glisse wrote: >> >> (not a review, I haven't even read the whole patch) >> >> On Fri, 28 Aug 2015, Andre Vieira wrote: >> >>> 2015-08-03 Andre Vieira >>> >>> * match.pd: Added new patterns: >>> ((X

Re: [PATCH][GCC] Algorithmic optimization in match and simplify

2015-09-01 Thread Andre Vieira
Hi Marc, On 28/08/15 19:07, Marc Glisse wrote: (not a review, I haven't even read the whole patch) On Fri, 28 Aug 2015, Andre Vieira wrote: 2015-08-03 Andre Vieira * match.pd: Added new patterns: ((X {&,<<,>>} C0) {|,^} C1) {^,|} C2) (X {|,^,&} C0) {<<,>>} C1 -> (X {<<,>>} C1) {

Re: [PATCH][GCC] Algorithmic optimization in match and simplify

2015-08-28 Thread Marc Glisse
(not a review, I haven't even read the whole patch) On Fri, 28 Aug 2015, Andre Vieira wrote: 2015-08-03 Andre Vieira * match.pd: Added new patterns: ((X {&,<<,>>} C0) {|,^} C1) {^,|} C2) (X {|,^,&} C0) {<<,>>} C1 -> (X {<<,>>} C1) {|,^,&} (C0 {<<,>>} C1) +(for op0 (rshift rshift ls

[PATCH][GCC] Algorithmic optimization in match and simplify

2015-08-28 Thread Andre Vieira
Two new algorithmic optimisations: 1.((X op0 C0) op1 C1) op2 C2) with op0 = {&, >>, <<}, op1 = {|,^}, op2 = {|,^} and op1 != op2 zero_mask has 1's for all bits that are sure to be 0 in (X op0 C0) and 0's otherwise. if (op1 == '^') C1 &= ~C2 (Only changed if actually emitted)