[Bug tree-optimization/63464] compare one character to many: faster

2015-01-16 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63464 --- Comment #17 from Jakub Jelinek --- Or try to deal with this in combine. We have: (insn 91 90 92 18 (parallel [ (set (reg:DI 149 [ D.1943 ]) (and:DI (reg:DI 147 [ D.1943 ]) (const_int 1 [0x1])))

[Bug tree-optimization/63464] compare one character to many: faster

2015-01-16 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63464 --- Comment #16 from Jakub Jelinek --- So, I had a brief look at the #c14 issues. --- gcc/match.pd.jj2015-01-05 13:07:14.0 +0100 +++ gcc/match.pd2015-01-16 16:27:08.053817209 +0100 @@ -614,6 +614,16 @@ (define_operator_list inver

[Bug tree-optimization/63464] compare one character to many: faster

2014-10-17 Thread ubizjak at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63464 --- Comment #15 from Uroš Bizjak --- (In reply to Jakub Jelinek from comment #14) > So, supposedly there is something we want to match-and-simplify, perhaps > also something we want to simplify at the RTL level, and check if > bt+set{,n}c might

[Bug tree-optimization/63464] compare one character to many: faster

2014-10-17 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63464 Jakub Jelinek changed: What|Removed |Added CC||uros at gcc dot gnu.org --- Comment #14

[Bug tree-optimization/63464] compare one character to many: faster

2014-10-17 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63464 --- Comment #13 from Jakub Jelinek --- Author: jakub Date: Fri Oct 17 10:54:54 2014 New Revision: 216393 URL: https://gcc.gnu.org/viewcvs?rev=216393&root=gcc&view=rev Log: PR tree-optimization/63464 * gimple.h (gimple_seq_discard): New p

[Bug tree-optimization/63464] compare one character to many: faster

2014-10-15 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63464 --- Comment #12 from Jakub Jelinek --- Created attachment 33724 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=33724&action=edit gcc5-pr63464.patch Untested patch.

[Bug tree-optimization/63464] compare one character to many: faster

2014-10-14 Thread rguenther at suse dot de
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63464 --- Comment #11 from rguenther at suse dot de --- On Mon, 13 Oct 2014, jakub at gcc dot gnu.org wrote: > https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63464 > > --- Comment #9 from Jakub Jelinek --- > Created attachment 33697 > --> https://gc

[Bug tree-optimization/63464] compare one character to many: faster

2014-10-13 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63464 --- Comment #10 from Jakub Jelinek --- Created attachment 33698 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=33698&action=edit bittest.c Testcase I've been playing with.

[Bug tree-optimization/63464] compare one character to many: faster

2014-10-13 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63464 --- Comment #9 from Jakub Jelinek --- Created attachment 33697 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=33697&action=edit gcc5-pr63464.patch WIP patch. What is missing: 1) the optimize_range_tests_to_bit_test call should be guarded

[Bug tree-optimization/63464] compare one character to many: faster

2014-10-10 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63464 --- Comment #8 from Jakub Jelinek --- Author: jakub Date: Fri Oct 10 12:15:30 2014 New Revision: 216072 URL: https://gcc.gnu.org/viewcvs?rev=216072&root=gcc&view=rev Log: PR tree-optimization/63464 * tree-switch-conversion.c (struct case

[Bug tree-optimization/63464] compare one character to many: faster

2014-10-07 Thread glisse at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63464 --- Comment #7 from Marc Glisse --- The SLP version is slightly slower than the bit test in this case (at least on my old desktop), but it can more easily handle testing for characters that are not within 64 of each other. __m128i b=_mm_set1_e

[Bug tree-optimization/63464] compare one character to many: faster

2014-10-07 Thread glisse at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63464 --- Comment #6 from Marc Glisse --- (In reply to Jakub Jelinek from comment #1) > We have this optimization implemented for switches, Thanks, that's indeed the most natural place for it, although I hadn't thought of testing that... Glibc's strs

[Bug tree-optimization/63464] compare one character to many: faster

2014-10-07 Thread rguenther at suse dot de
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63464 --- Comment #5 from rguenther at suse dot de --- On Tue, 7 Oct 2014, jakub at gcc dot gnu.org wrote: > https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63464 > > --- Comment #4 from Jakub Jelinek --- > Created attachment 33658 > --> https://gcc.

[Bug tree-optimization/63464] compare one character to many: faster

2014-10-07 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63464 --- Comment #4 from Jakub Jelinek --- Created attachment 33658 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=33658&action=edit gcc5-pr63464.patch Updated patch for the switchconv, this time checking rtx costs. As for reassoc, the problem

[Bug tree-optimization/63464] compare one character to many: faster

2014-10-06 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63464 --- Comment #3 from Jakub Jelinek --- Created attachment 33654 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=33654&action=edit gcc5-pr63464.patch Untested patch to avoid the subtraction of info.range_min from index. Might not always be a

[Bug tree-optimization/63464] compare one character to many: faster

2014-10-06 Thread rguenther at suse dot de
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63464 --- Comment #2 from rguenther at suse dot de --- On Mon, 6 Oct 2014, jakub at gcc dot gnu.org wrote: > https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63464 > > Jakub Jelinek changed: > >What|Removed |Added >

[Bug tree-optimization/63464] compare one character to many: faster

2014-10-06 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63464 Jakub Jelinek changed: What|Removed |Added Status|UNCONFIRMED |NEW Last reconfirmed|