https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90838
--- Comment #21 from Wilco ---
(In reply to Gabriel Ravier from comment #19)
> If the original code being branchless makes it faster, wouldn't that imply
> that we should use the table-based implementation when generating code for
> `__builtin_c
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90838
--- Comment #20 from Jakub Jelinek ---
No, because __builtin_ctz is branchless too, it just has UB when the argument
is 0.
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90838
--- Comment #19 from Gabriel Ravier ---
(In reply to Jakub Jelinek from comment #14)
> The patch does:
> + bool zero_ok = CTZ_DEFINED_VALUE_AT_ZERO (TYPE_MODE (type), ctzval)
> == 2;
> +
> + /* Skip if there is no value defined at zero,
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90838
--- Comment #18 from Jakub Jelinek ---
It is generally a win for cases where the condition can't be predicted, while
if it can, jumps are much better. We have dozens or hundreds of PRs about this
in either direction on x86.
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90838
--- Comment #17 from Wilco ---
(In reply to Jakub Jelinek from comment #16)
> (In reply to Wilco from comment #15)
> > It would make more sense to move x86 backends to CTZ_DEFINED_VALUE_AT_ZERO
> > == 2 so that you always get the same result even
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90838
--- Comment #16 from Jakub Jelinek ---
(In reply to Wilco from comment #15)
> It would make more sense to move x86 backends to CTZ_DEFINED_VALUE_AT_ZERO
> == 2 so that you always get the same result even when you don't have tzcnt.
> A conditional
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90838
--- Comment #15 from Wilco ---
(In reply to Jakub Jelinek from comment #14)
> The patch does:
> + bool zero_ok = CTZ_DEFINED_VALUE_AT_ZERO (TYPE_MODE (type), ctzval)
> == 2;
> +
> + /* Skip if there is no value defined at zero, or if we
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90838
--- Comment #14 from Jakub Jelinek ---
The patch does:
+ bool zero_ok = CTZ_DEFINED_VALUE_AT_ZERO (TYPE_MODE (type), ctzval) ==
2;
+
+ /* Skip if there is no value defined at zero, or if we can't easily
+return the correct value
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90838
--- Comment #13 from Andrew Pinski ---
(In reply to Gabriel Ravier from comment #12)
> It appears this new optimization is non-functional on trunk with x86-64...
> specifically on x86-64, too, on AArch64 it works just fine. So does that
> mean th
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90838
Gabriel Ravier changed:
What|Removed |Added
CC||gabravier at gmail dot com
--- Comment
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90838
Tamar Christina changed:
What|Removed |Added
Status|ASSIGNED|RESOLVED
CC|
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90838
--- Comment #10 from CVS Commits ---
The master branch has been updated by Jakub Jelinek :
https://gcc.gnu.org/git/gitweb.cgi?p=gcc.git;h=eb7c7c524556df5364f03adc20f6a9db20858484
commit r10-5912-geb7c7c524556df5364f03adc20f6a9db20858484
Author:
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90838
--- Comment #9 from Jakub Jelinek ---
Author: jakub
Date: Fri Jan 10 21:10:03 2020
New Revision: 280140
URL: https://gcc.gnu.org/viewcvs?rev=280140&root=gcc&view=rev
Log:
PR tree-optimization/90838
* tree-ssa-forwprop.c (simplify
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90838
--- Comment #8 from Wilco ---
Author: wilco
Date: Fri Jan 10 19:32:53 2020
New Revision: 280132
URL: https://gcc.gnu.org/viewcvs?rev=280132&root=gcc&view=rev
Log:
PR90838: Support ctz idioms
Support common idioms for count trailing zeroes using
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90838
Wilco changed:
What|Removed |Added
Status|UNCONFIRMED |ASSIGNED
Last reconfirmed|
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90838
--- Comment #6 from rguenther at suse dot de ---
On Wed, 12 Jun 2019, ktkachov at gcc dot gnu.org wrote:
> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90838
>
> --- Comment #5 from ktkachov at gcc dot gnu.org ---
> FWIW, there is another simil
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90838
--- Comment #5 from ktkachov at gcc dot gnu.org ---
FWIW, there is another similar function in deepsjeng that computes a
side-effect:
int
myctz2 (unsigned long long * const b) {
unsigned long long lsb = (*b) & -(*b);
*b ^= lsb;
return
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90838
--- Comment #4 from Jakub Jelinek ---
I think it looks too complex to do it in match.pd, wouldn't it be better to do
it say in tree-ssa-math-opts.c and thus just once?
That said, due to the x & -x it is really bound to a small number of values
th
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90838
Richard Biener changed:
What|Removed |Added
CC||rguenth at gcc dot gnu.org
--- Comment
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90838
Wilco changed:
What|Removed |Added
CC||wdijkstr at arm dot com
--- Comment #2 from Wilc
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90838
Jakub Jelinek changed:
What|Removed |Added
CC||jakub at gcc dot gnu.org
--- Comment #1
21 matches
Mail list logo