[Bug tree-optimization/92734] Missing match.pd simplification done by fold_binary_loc on generic

2019-12-04 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92734 --- Comment #9 from Jakub Jelinek --- Author: jakub Date: Wed Dec 4 09:38:48 2019 New Revision: 278958 URL: https://gcc.gnu.org/viewcvs?rev=278958&root=gcc&view=rev Log: PR tree-optimization/92734 * match.pd ((A +- B) - A -> +-

[Bug tree-optimization/92734] Missing match.pd simplification done by fold_binary_loc on generic

2019-12-03 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92734 --- Comment #8 from Jakub Jelinek --- Created attachment 47406 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=47406&action=edit gcc10-pr92734-2.patch Untested patch that implements that.

[Bug tree-optimization/92734] Missing match.pd simplification done by fold_binary_loc on generic

2019-12-03 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92734 --- Comment #7 from Jakub Jelinek --- I'm wondering if we shouldn't adjust also the /* (A +- B) - A -> +- B */ /* (A +- B) -+ B -> A */ /* A - (A +- B) -> -+ B */ /* A +- (B -+ A) -> +- B */ patterns. Say testcas

[Bug tree-optimization/92734] Missing match.pd simplification done by fold_binary_loc on generic

2019-12-03 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92734 Richard Biener changed: What|Removed |Added Status|ASSIGNED|RESOLVED Resolution|---

[Bug tree-optimization/92734] Missing match.pd simplification done by fold_binary_loc on generic

2019-12-03 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92734 --- Comment #5 from Jakub Jelinek --- Author: jakub Date: Tue Dec 3 09:20:43 2019 New Revision: 278925 URL: https://gcc.gnu.org/viewcvs?rev=278925&root=gcc&view=rev Log: PR tree-optimization/92734 * match.pd ((CST1 - A) +- CST2

[Bug tree-optimization/92734] Missing match.pd simplification done by fold_binary_loc on generic

2019-12-02 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92734 Jakub Jelinek changed: What|Removed |Added Status|UNCONFIRMED |ASSIGNED Last reconfirmed|

[Bug tree-optimization/92734] Missing match.pd simplification done by fold_binary_loc on generic

2019-12-02 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92734 --- Comment #3 from Jakub Jelinek --- The (A +- CST1) +- CST2 -> A + CST3 pattern already does handle casts it seems, it is just the other two that don't. That has been added in r249447 with a follow-up fix in r257683.

[Bug tree-optimization/92734] Missing match.pd simplification done by fold_binary_loc on generic

2019-12-01 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92734 --- Comment #2 from Richard Biener --- We have a set of special-case patterns for simple associations in match.pd, one for this case seems missing, like the group /* Match patterns that allow contracting a plus-minus pair irrespective of

[Bug tree-optimization/92734] Missing match.pd simplification done by fold_binary_loc on generic

2019-11-29 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92734 --- Comment #1 from Jakub Jelinek --- Of course we have reassoc, but in there we punt on the non-wrapping integral types, because reassociation is generally unsafe for them. There are just special cases that can be handled.