[Bug middle-end/78103] Failure to optimize with __builtin_clzl

2021-08-01 Thread cvs-commit at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78103 --- Comment #24 from CVS Commits --- The master branch has been updated by H.J. Lu : https://gcc.gnu.org/g:6f0c43e97825ee54e3779afbedcd0def12443001 commit r12-2656-g6f0c43e97825ee54e3779afbedcd0def12443001 Author: H.J. Lu Date: Sun Aug 1 09:

[Bug middle-end/78103] Failure to optimize with __builtin_clzl

2021-07-31 Thread jakub at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78103 Jakub Jelinek changed: What|Removed |Added Status|ASSIGNED|RESOLVED Resolution|---

[Bug middle-end/78103] Failure to optimize with __builtin_clzl

2021-07-31 Thread cvs-commit at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78103 --- Comment #22 from CVS Commits --- The master branch has been updated by Jakub Jelinek : https://gcc.gnu.org/g:91425e2adecd00091d7443104ecb367686e88663 commit r12-2649-g91425e2adecd00091d7443104ecb367686e88663 Author: Jakub Jelinek Date: S

[Bug middle-end/78103] Failure to optimize with __builtin_clzl

2021-07-27 Thread segher at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78103 --- Comment #21 from Segher Boessenkool --- (In reply to Jakub Jelinek from comment #19) > Created attachment 51211 [details] > gcc12-pr78103.patch > > Updated untested patch that uses define_insn_and_split in 2 cases instead of > the combine sp

[Bug middle-end/78103] Failure to optimize with __builtin_clzl

2021-07-27 Thread segher at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78103 --- Comment #20 from Segher Boessenkool --- (In reply to Jakub Jelinek from comment #18) > (In reply to Segher Boessenkool from comment #17) > > > Nothing changes for combine though, I think it really would be nice if it > > > could either change

[Bug middle-end/78103] Failure to optimize with __builtin_clzl

2021-07-27 Thread jakub at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78103 Jakub Jelinek changed: What|Removed |Added Status|NEW |ASSIGNED Assignee|unassigned a

[Bug middle-end/78103] Failure to optimize with __builtin_clzl

2021-07-27 Thread jakub at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78103 --- Comment #18 from Jakub Jelinek --- (In reply to Segher Boessenkool from comment #17) > > Nothing changes for combine though, I think it really would be nice if it > > could either change newly added pseudos from combine_split_insns by i2dest

[Bug middle-end/78103] Failure to optimize with __builtin_clzl

2021-07-27 Thread segher at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78103 --- Comment #17 from Segher Boessenkool --- (In reply to Jakub Jelinek from comment #16) > Created attachment 51209 [details] > gcc12-pr78103.patch > > Updated patch. This one fixes the reuse of a pseudo you've mentioned above, > and fixes gcc.

[Bug middle-end/78103] Failure to optimize with __builtin_clzl

2021-07-27 Thread jakub at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78103 Jakub Jelinek changed: What|Removed |Added Attachment #51204|0 |1 is obsolete|

[Bug middle-end/78103] Failure to optimize with __builtin_clzl

2021-07-26 Thread segher at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78103 --- Comment #15 from Segher Boessenkool --- (In reply to Jakub Jelinek from comment #14) > (In reply to Segher Boessenkool from comment #13) > > (In reply to Jakub Jelinek from comment #10) > > > Unfortunately, it doesn't work for the #c0 testcas

[Bug middle-end/78103] Failure to optimize with __builtin_clzl

2021-07-26 Thread jakub at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78103 --- Comment #14 from Jakub Jelinek --- (In reply to Segher Boessenkool from comment #13) > (In reply to Jakub Jelinek from comment #10) > > Unfortunately, it doesn't work for the #c0 testcase, after the combiner > > splitter kicks in, the combine

[Bug middle-end/78103] Failure to optimize with __builtin_clzl

2021-07-26 Thread segher at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78103 --- Comment #13 from Segher Boessenkool --- (In reply to Jakub Jelinek from comment #10) > Unfortunately, it doesn't work for the #c0 testcase, after the combiner > splitter kicks in, the combiner doesn't even try that 4 insn combination. It do

[Bug middle-end/78103] Failure to optimize with __builtin_clzl

2021-07-26 Thread jakub at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78103 --- Comment #12 from Jakub Jelinek --- If reusing i2dest for the find_split_case is fine (I must say I'm a little bit worried about uses of the pseudo in debug insns, whether if we reuse it for something else we properly adjust those insns (or re

[Bug middle-end/78103] Failure to optimize with __builtin_clzl

2021-07-26 Thread jakub at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78103 --- Comment #11 from Jakub Jelinek --- Or is it because of the new pseudo that is created for the temporary? Seems when the combiner is splitting the insns itself using find_split_point, it tries to reuse i2dest if possible for the middle tempora

[Bug middle-end/78103] Failure to optimize with __builtin_clzl

2021-07-26 Thread jakub at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78103 Jakub Jelinek changed: What|Removed |Added CC||segher at gcc dot gnu.org --- Comment #1

[Bug middle-end/78103] Failure to optimize with __builtin_clzl

2021-07-26 Thread jakub at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78103 --- Comment #9 from Jakub Jelinek --- Created attachment 51204 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=51204&action=edit gcc12-pr78103.patch Untested partial fix. The patch does 2 things, one is (shown on the first testcase) optimiz

[Bug middle-end/78103] Failure to optimize with __builtin_clzl

2021-07-24 Thread jakub at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78103 --- Comment #8 from Jakub Jelinek --- I actually think this should be doable with combiner splitters. For the unsigned int findLastSet3(unsigned long x) { return x ? 8 * sizeof(unsigned long) - __builtin_clzl(x) : 0; } or unsigned int findLastS

[Bug middle-end/78103] Failure to optimize with __builtin_clzl

2021-07-23 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78103 --- Comment #7 from Andrew Pinski --- Part of the problem is __builtin_clzl returns a signed integer :).

[Bug middle-end/78103] Failure to optimize with __builtin_clzl

2016-11-10 Thread prathamesh3492 at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78103 prathamesh3492 at gcc dot gnu.org changed: What|Removed |Added CC||prathamesh3492 at gcc

[Bug middle-end/78103] Failure to optimize with __builtin_clzl

2016-10-25 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78103 --- Comment #5 from Richard Biener --- (In reply to Jakub Jelinek from comment #4) > I wouldn't introduce a builtin, that would be user accessible, perhaps > internal function + corresponding optab and just pattern match it. Yeah, IFN + optab is

[Bug middle-end/78103] Failure to optimize with __builtin_clzl

2016-10-25 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78103 Jakub Jelinek changed: What|Removed |Added CC||jakub at gcc dot gnu.org --- Comment #4

[Bug middle-end/78103] Failure to optimize with __builtin_clzl

2016-10-25 Thread ubizjak at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78103 Uroš Bizjak changed: What|Removed |Added Component|target |middle-end --- Comment #3 from Uroš Bizjak