[Bug tree-optimization/90836] Missing popcount pattern matching
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90836 Tamar Christina changed: What|Removed |Added Status|NEW |RESOLVED CC||tnfchris at gcc dot gnu.org Resolution|--- |FIXED Target Milestone|--- |10.0 --- Comment #5 from Tamar Christina --- Fixed on trunk
[Bug tree-optimization/90836] Missing popcount pattern matching
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90836 --- Comment #4 from Steve Ellcey --- Author: sje Date: Tue Oct 8 21:53:03 2019 New Revision: 276722 URL: https://gcc.gnu.org/viewcvs?rev=276722&root=gcc&view=rev Log: 2019-10-08 Dmitrij Pochepko PR tree-optimization/90836 * lib/target-supports.exp (check_effective_target_popcount) (check_effective_target_popcountll): New effective targets. * gcc.dg/tree-ssa/popcount4.c: New test. * gcc.dg/tree-ssa/popcount4l.c: New test. * gcc.dg/tree-ssa/popcount4ll.c: New test. Added: trunk/gcc/testsuite/gcc.dg/tree-ssa/popcount4.c trunk/gcc/testsuite/gcc.dg/tree-ssa/popcount4l.c trunk/gcc/testsuite/gcc.dg/tree-ssa/popcount4ll.c Modified: trunk/gcc/testsuite/ChangeLog trunk/gcc/testsuite/lib/target-supports.exp
[Bug tree-optimization/90836] Missing popcount pattern matching
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90836 --- Comment #3 from Steve Ellcey --- Author: sje Date: Tue Oct 8 21:50:05 2019 New Revision: 276721 URL: https://gcc.gnu.org/viewcvs?rev=276721&root=gcc&view=rev Log: 2019-10-08 Dmitrij Pochepko PR tree-optimization/90836 * gcc/match.pd (popcount): New pattern. Modified: trunk/gcc/ChangeLog trunk/gcc/match.pd
[Bug tree-optimization/90836] Missing popcount pattern matching
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90836 --- Comment #2 from Wilco --- (In reply to Richard Biener from comment #1) > While it could be matched in match.pd variations would be quite a lot. > I don't see where else it fits (apart from forwprop which already does > fancy pattern matching...). > > You probably want to match generic INTEGER_CSTs and delay the actual > verification into a with {}. > > I suppose popcount on integers other than long long work with the same > pattern? There are lots of possible variations and given proving that a particular sequence is equivalent to popcount may be too difficult, it's about supporting the cases that occur in code that people care about.
[Bug tree-optimization/90836] Missing popcount pattern matching
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90836 Richard Biener changed: What|Removed |Added Status|UNCONFIRMED |NEW Last reconfirmed||2019-06-11 Blocks||26163 Ever confirmed|0 |1 --- Comment #1 from Richard Biener --- While it could be matched in match.pd variations would be quite a lot. I don't see where else it fits (apart from forwprop which already does fancy pattern matching...). You probably want to match generic INTEGER_CSTs and delay the actual verification into a with {}. I suppose popcount on integers other than long long work with the same pattern? Referenced Bugs: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=26163 [Bug 26163] [meta-bug] missed optimization in SPEC (2k17, 2k and 2k6 and 95)