https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71961
--- Comment #18 from Thomas Koenig ---
Author: tkoenig
Date: Sun Aug 7 15:25:56 2016
New Revision: 239221
URL: https://gcc.gnu.org/viewcvs?rev=239221&root=gcc&view=rev
Log:
2016-08-07 Thomas Koenig
PR fortran/71961
* gfortra
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70040
Thomas Koenig changed:
What|Removed |Added
Summary|[6/7 Regression] ICE in |[6 Regression] ICE in
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70040
--- Comment #9 from Thomas Koenig ---
Author: tkoenig
Date: Sun Aug 7 15:40:34 2016
New Revision: 239222
URL: https://gcc.gnu.org/viewcvs?rev=239222&root=gcc&view=rev
Log:
2016-08-07 Thomas Koenig
PR fortran/70040
Corrected
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70040
--- Comment #11 from Thomas Koenig ---
Author: tkoenig
Date: Sun Aug 7 15:56:25 2016
New Revision: 239223
URL: https://gcc.gnu.org/viewcvs?rev=239223&root=gcc&view=rev
Log:
2016-08-07 Thomas Koenig
PR fortran/70040
Backport
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70040
Thomas Koenig changed:
What|Removed |Added
Summary|[6 Regression] ICE in |[5 Regression] ICE in
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65677
Thomas Koenig changed:
What|Removed |Added
CC||tkoenig at gcc dot gnu.org
--- Comment
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71795
--- Comment #10 from Thomas Koenig ---
Author: tkoenig
Date: Sun Aug 7 17:01:39 2016
New Revision: 239224
URL: https://gcc.gnu.org/viewcvs?rev=239224&root=gcc&view=rev
Log:
2016-08-07 Thomas Koenig
PR fortran/71795
Backport
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71795
Thomas Koenig changed:
What|Removed |Added
Summary|[5/6/7 Regression] Two Bugs |[5 Regression] Two Bugs in
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65677
--- Comment #3 from Thomas Koenig ---
ig25@linux-fd1f:~/Krempel/Ass> cat a.f90
program main
character(:), allocatable :: text
text = 'asdf'
text = adjustl(text(2:))
print *,text
end program main
ig25@linux-fd1f:~/Krempel/Ass> gfortran a.
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70040
--- Comment #14 from Thomas Koenig ---
Author: tkoenig
Date: Mon Aug 8 06:29:16 2016
New Revision: 239229
URL: https://gcc.gnu.org/viewcvs?rev=239229&root=gcc&view=rev
Log:
2016-08-08 Thomas Koenig
PR fortran/70040
Backport
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68241
Bug 68241 depends on bug 70040, which changed state.
Bug 70040 Summary: [5 Regression] ICE in gimplify.c with deferred-length strings
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70040
What|Removed |Added
--
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70040
Thomas Koenig changed:
What|Removed |Added
Status|WAITING |RESOLVED
Resolution|---
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=60526
--- Comment #17 from Thomas Koenig ---
Author: tkoenig
Date: Mon Aug 8 22:00:37 2016
New Revision: 239259
URL: https://gcc.gnu.org/viewcvs?rev=239259&root=gcc&view=rev
Log:
2016-08-08 Thomas Koenig
Backport from trunk
PR for
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=60526
Thomas Koenig changed:
What|Removed |Added
Status|ASSIGNED|RESOLVED
Resolution|---
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69742
--- Comment #9 from Thomas Koenig ---
Author: tkoenig
Date: Tue Aug 9 06:28:57 2016
New Revision: 239271
URL: https://gcc.gnu.org/viewcvs?rev=239271&root=gcc&view=rev
Log:
2016-08-09 Thomas Koenig
Backport from trunk
PR fort
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69742
Thomas Koenig changed:
What|Removed |Added
Status|ASSIGNED|RESOLVED
Resolution|---
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71902
Thomas Koenig changed:
What|Removed |Added
Summary|[5/6 Regression] Unneeded |[5/6/7 Regression] Unneeded
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71795
--- Comment #12 from Thomas Koenig ---
Author: tkoenig
Date: Tue Aug 9 20:33:00 2016
New Revision: 239302
URL: https://gcc.gnu.org/viewcvs?rev=239302&root=gcc&view=rev
Log:
2016-08-09 Thomas Koenig
Backport from trunk
PR for
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71795
Thomas Koenig changed:
What|Removed |Added
Status|ASSIGNED|RESOLVED
Resolution|---
||tkoenig at gcc dot gnu.org
Resolution|--- |FIXED
--- Comment #4 from Thomas Koenig ---
All of these ICEs are now gone with r238822.
||tkoenig at gcc dot gnu.org
Resolution|--- |FIXED
--- Comment #4 from Thomas Koenig ---
Fixed with r238822.
||tkoenig at gcc dot gnu.org
Resolution|--- |FIXED
--- Comment #3 from Thomas Koenig ---
(In reply to Tobias Burnus from comment #2)
> Author: burnus
> Date: Mon Jun 20 18:46:43 2016
> New Revision: 237612
This fixed it, closing.
||tkoenig at gcc dot gnu.org
Resolution|--- |FIXED
--- Comment #4 from Thomas Koenig ---
This no longer ICEs, probably after r238822 .
Closing as fixed.
||tkoenig at gcc dot gnu.org
Resolution|--- |FIXED
--- Comment #4 from Thomas Koenig ---
The ICE is gone with r238822.
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=58787
--- Comment #4 from Thomas Koenig ---
No longer ICEs with r238822.
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=58787
Thomas Koenig changed:
What|Removed |Added
Status|NEW |RESOLVED
Resolution|---
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69859
Thomas Koenig changed:
What|Removed |Added
CC||tkoenig at gcc dot gnu.org
--- Comment
||tkoenig at gcc dot gnu.org
--- Comment #4 from Thomas Koenig ---
Still many invalid reads using valgrind:
Error: Fortran 2003: PROCEDURE statement at (1)
==13422== Invalid read of size 8
==13422==at 0x6B2540: gfc_sym_get_dummy_args(gfc_symbol*) (symbol.c:4662)
==13422
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65045
Thomas Koenig changed:
What|Removed |Added
Last reconfirmed|2015-02-13 00:00:00 |2016-8-9
--- Comment #12 from Thomas Koe
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68147
--- Comment #15 from Thomas Koenig ---
This is fixed on trunk and 6-branch (so it will be in the
next release). 5-branch still to do.
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68147
--- Comment #16 from Thomas Koenig ---
Author: tkoenig
Date: Sat Aug 13 15:04:04 2016
New Revision: 239445
URL: https://gcc.gnu.org/viewcvs?rev=239445&root=gcc&view=rev
Log:
2016-08-13 Thomas Koenig
Backport from trunk
PR for
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68147
Thomas Koenig changed:
What|Removed |Added
Status|ASSIGNED|RESOLVED
Resolution|---
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68241
Bug 68241 depends on bug 68147, which changed state.
Bug 68147 Summary: Potential incorrect code generation for string
self-assignment
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68147
What|Removed |Added
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71902
Thomas Koenig changed:
What|Removed |Added
URL||https://gcc.gnu.org/ml/gcc-
Assignee: unassigned at gcc dot gnu.org
Reporter: tkoenig at gcc dot gnu.org
Target Milestone: ---
In order to aid optimization, it could be beneficial to
build libgfortran as an lto-enabled library. There could be
a big win for functions being called via constant propagation
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77296
--- Comment #1 from Thomas Koenig ---
Also fails with 5.4.0.
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77278
Thomas Koenig changed:
What|Removed |Added
Status|UNCONFIRMED |NEW
Last reconfirmed|
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77278
--- Comment #2 from Thomas Koenig ---
Here's a test case which shows a performance loss with LTO-enabled
libgfortran.
program main
implicit none
integer, parameter :: n=10**7
integer :: i
real, dimension(n) :: a
real :: t1, t2, t3
ca
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77278
--- Comment #3 from Thomas Koenig ---
Some information about the type mismatch.
The first mismatch about gfortran_st_write is
lto1: warning: type of '_gfortran_st_write' does not match original declaration
[-Wlto-type-mismatch]
Breakpoint 1, w
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77296
Thomas Koenig changed:
What|Removed |Added
Keywords||ice-on-valid-code,
|
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77351
--- Comment #3 from Thomas Koenig ---
Hi steve,
> Thou shalt not derefernce NULL pointers.
Correct.
The patch is pre-approved (alternatively, it could be
considered obvious and simple).
Thanks!
Regards
Thomas
||tkoenig at gcc dot gnu.org
--- Comment #6 from Thomas Koenig ---
Still an issue:
#include
#include
int main()
{
float complex c,d;
foo(&c);
d=1.0f/c;
return creal(d)+cimag(d)<0;
}
Using -fcx-fortran-rules yields (from the optimized dump)
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=22041
Thomas Koenig changed:
What|Removed |Added
Last reconfirmed|2013-03-17 12:00:00 |2016-8-30
--- Comment #9 from Thomas Koe
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=49232
--- Comment #1 from Thomas Koenig ---
Straightforward patch:
Index: expr.c
===
--- expr.c (Revision 239218)
+++ expr.c (Arbeitskopie)
@@ -3764,6 +3764,45 @@
}
at gcc dot gnu.org |tkoenig at gcc dot
gnu.org
--- Comment #11 from Thomas Koenig ---
Harald, thanks for reducing it!
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99345
Thomas Koenig changed:
What|Removed |Added
Resolution|--- |FIXED
Status|ASSIGNED
Assignee: unassigned at gcc dot gnu.org
Reporter: tkoenig at gcc dot gnu.org
Target Milestone: ---
See https://gcc.gnu.org/pipermail/gcc-cvs/2021-March/343081.html ,
which is not distributed to bugzilla and the gcc-bugs mailing list,
despite the ChangeLog entry reading
Assignee: unassigned at gcc dot gnu.org
Reporter: tkoenig at gcc dot gnu.org
Target Milestone: ---
Created attachment 50567
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=50567&action=edit
Test case
We use the method given in "Division by Invariant Integers using
Mu
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94978
Thomas Koenig changed:
What|Removed |Added
Status|ASSIGNED|NEW
Assignee|tkoenig at gcc
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98076
Thomas Koenig changed:
What|Removed |Added
Assignee|tkoenig at gcc dot gnu.org |unassigned at gcc dot
gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82215
Thomas Koenig changed:
What|Removed |Added
Assignee|tkoenig at gcc dot gnu.org |unassigned at gcc dot
gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92913
Thomas Koenig changed:
What|Removed |Added
Assignee|tkoenig at gcc dot gnu.org |unassigned at gcc dot
gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97345
Thomas Koenig changed:
What|Removed |Added
Status|ASSIGNED|NEW
Assignee|tkoenig at gcc
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93114
Thomas Koenig changed:
What|Removed |Added
Status|ASSIGNED|NEW
Assignee|tkoenig at gcc
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96216
Thomas Koenig changed:
What|Removed |Added
Assignee|tkoenig at gcc dot gnu.org |unassigned at gcc dot
gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=30609
Thomas Koenig changed:
What|Removed |Added
Assignee|tkoenig at gcc dot gnu.org |unassigned at gcc dot
gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97454
Thomas Koenig changed:
What|Removed |Added
Status|ASSIGNED|NEW
Assignee|tkoenig at gcc
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83927
Thomas Koenig changed:
What|Removed |Added
Assignee|tkoenig at gcc dot gnu.org |unassigned at gcc dot
gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67202
Thomas Koenig changed:
What|Removed |Added
Status|ASSIGNED|NEW
Assignee|tkoenig at gcc
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90536
Thomas Koenig changed:
What|Removed |Added
Assignee|tkoenig at gcc dot gnu.org |unassigned at gcc dot
gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93956
Thomas Koenig changed:
What|Removed |Added
Assignee|tkoenig at gcc dot gnu.org |unassigned at gcc dot
gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95101
Thomas Koenig changed:
What|Removed |Added
Status|ASSIGNED|NEW
Assignee|tkoenig at gcc
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=40976
Thomas Koenig changed:
What|Removed |Added
Assignee|tkoenig at gcc dot gnu.org |unassigned at gcc dot
gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68289
Thomas Koenig changed:
What|Removed |Added
Assignee|tkoenig at gcc dot gnu.org |unassigned at gcc dot
gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92422
Thomas Koenig changed:
What|Removed |Added
Resolution|--- |FIXED
Status|WAITING
Assignee: unassigned at gcc dot gnu.org
Reporter: tkoenig at gcc dot gnu.org
Target Milestone: ---
Currently, the decls for Fortran library procedures are inconsistent,
which causes, among other things, segfaults on Darwin for ARM
(PR96168).
We should fix them all. For maxval
||https://gcc.gnu.org/bugzill
||a/show_bug.cgi?id=96168
Last reconfirmed||2020-10-16
Ever confirmed|0 |1
Assignee|unassigned at gcc dot gnu.org |tkoenig at gcc
-optimization
Assignee: unassigned at gcc dot gnu.org
Reporter: tkoenig at gcc dot gnu.org
Target Milestone: ---
The following two functions are equivalent:
unsigned r3_128u_v1 (__uint128_t n)
{
unsigned long a;
a = (n >> 64) + (n & 0x);
re
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97459
--- Comment #4 from Thomas Koenig ---
Here's a complete program for benchmarks on x86_64, using Jakub's
functions (so they are indeed correct):
#include
#include
#include
#include
#include
#include
unsigned r3_128u_v2 (__uint128_t n)
{
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97459
--- Comment #5 from Thomas Koenig ---
OK, so here is a benchmark with its function names corrected. It also
includes one version (_v5) which is a bit faster.
(Note I increased the number of iterations to get more accuracy out
of the cycle count,
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95119
--- Comment #13 from Thomas Koenig ---
(In reply to Bill Long from comment #12)
> Original submitter asking which GCC version(s) have / will have the fix.
10.2 already has been released with the fix. 9.4 and 11.1 will have it in when
they are re
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95104
Thomas Koenig changed:
What|Removed |Added
CC||tkoenig at gcc dot gnu.org
--- Comment
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95037
--- Comment #5 from Thomas Koenig ---
Fixed in 10.2, 9.4 and 11.1 will have it.
Priority: P3
Component: fortran
Assignee: unassigned at gcc dot gnu.org
Reporter: tkoenig at gcc dot gnu.org
Target Milestone: ---
$ cat pure.f90
pure function foo(x) result (ret)
integer :: ret
integer, value :: x
x = x / 2
ret = x
end function foo
$ gfortran
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97459
--- Comment #9 from Thomas Koenig ---
(In reply to Jakub Jelinek from comment #7)
> So, can we use this for anything but modulo 3, or 5, or 17, or 257 (all of
> those have 2^32 mod N == 2^64 mod N == 2^128 mod N == 1)
I think so, too.
> probabl
NCONFIRMED
Severity: normal
Priority: P3
Component: bootstrap
Assignee: unassigned at gcc dot gnu.org
Reporter: tkoenig at gcc dot gnu.org
Target Milestone: ---
Created attachment 49418
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=49418&action=edi
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97527
--- Comment #1 from Thomas Koenig ---
Created attachment 49419
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=49419&action=edit
Preprocessed source of gimple-match.ii (compressed)
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97527
--- Comment #2 from Thomas Koenig ---
Created attachment 49420
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=49420&action=edit
Resulting assember file (which is incomplete)
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97527
--- Comment #3 from Thomas Koenig ---
Created attachment 49421
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=49421&action=edit
config.log from the main build directory
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97527
Thomas Koenig changed:
What|Removed |Added
Target||x86_64-unknown-openbsd6.8
--- Comment #4
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97527
--- Comment #5 from Thomas Koenig ---
Created attachment 49422
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=49422&action=edit
Generated gimple-match.c
All the temporary files were generated by manually adding -save-temps
to the Makefile
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97527
--- Comment #6 from Thomas Koenig ---
The machine is gcc220.fsffrance.org ; if anybody has an account there
and wants to peek into /home/tkoenig to look into more details, be my
guest.
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97527
--- Comment #8 from Thomas Koenig ---
The *.s file generated with -save-temps is attached, but it
is truncated for a reason that I do not understand.
The binutils is indeed self-compiled from source (because the LLVM
linker cannot handle gcc com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97527
--- Comment #9 from Thomas Koenig ---
Created attachment 49423
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=49423&action=edit
config.log from libgomp using binutils compiled with gcc 8.4.0
Using the binutils compiled with gcc 8.4 now lea
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97459
--- Comment #10 from Thomas Koenig ---
There are a couple of more constants for this could be tried.
Base 7:
static unsigned
rem_7_v2 (mytype n)
{
unsigned long a, b, c, d;
a = n & MASK_48;
b = (n >> 48) & MASK_48;
c = n >> 96;
retur
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97459
--- Comment #11 from Thomas Koenig ---
Created attachment 49438
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=49438&action=edit
Numbers a, b so that 2^b ≡ 1 mod a up to b=64, larger b taken if several
solutions exist
Here is the promised
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97459
--- Comment #12 from Thomas Koenig ---
(In reply to Thomas Koenig from comment #11)
> Created attachment 49438 [details]
> Numbers a, b so that 2^b ≡ 1 mod a up to b=64, larger b taken if several
> solutions exist
>
A quick check that all numbe
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97530
Thomas Koenig changed:
What|Removed |Added
Status|UNCONFIRMED |NEW
Last reconfirmed|
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97530
--- Comment #3 from Thomas Koenig ---
A little bit more reduced.
module types
type local_model_state
real, allocatable :: ps(:,:) ! Surface pressure
end type local_model_state
contains
function int_mult(ms, ifactor)
type(local_mo
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97530
Thomas Koenig changed:
What|Removed |Added
Status|NEW |RESOLVED
Resolution|---
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88076
Bug 88076 depends on bug 97530, which changed state.
Bug 97530 Summary: Segmentation fault compiling coarray program with option
-fcoarray=shared (not with -fcoarray={lib,single})
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97530
Wha
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97459
Thomas Koenig changed:
What|Removed |Added
Attachment #49438|divisiontable.dat |divisiontable.txt
filename|
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97589
Thomas Koenig changed:
What|Removed |Added
Status|UNCONFIRMED |RESOLVED
Resolution|---
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97589
Thomas Koenig changed:
What|Removed |Added
Status|RESOLVED|REOPENED
Last reconfirmed|
Priority: P3
Component: middle-end
Assignee: unassigned at gcc dot gnu.org
Reporter: tkoenig at gcc dot gnu.org
Target Milestone: ---
This involves Fortran, but possibly also other languages.
Consider
$ cat alias.f90
program main
interface
subroutine foo(a
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96735
Thomas Koenig changed:
What|Removed |Added
Resolution|--- |INVALID
Status|WAITING
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97320
Thomas Koenig changed:
What|Removed |Added
CC||tkoenig at gcc dot gnu.org
: P3
Component: rtl-optimization
Assignee: unassigned at gcc dot gnu.org
Reporter: tkoenig at gcc dot gnu.org
Target Milestone: ---
A straightforward implementation of HAKMEM 175 (returning
the next number with the same number of bits) is
unsigned int
next_same_bit (unsigned int v
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97738
--- Comment #2 from Thomas Koenig ---
Created attachment 49516
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=49516&action=edit
Small benchmark
Here's a small benchmark for counting all 32-bit numbers with 16 bits set
according to the HAKM
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97738
--- Comment #3 from Thomas Koenig ---
Even faster code:
ctz = __builtin_ctz (value);
lowest_bit = value & - value;
left_bits = value + lowest_bit;
changed_bits = value ^ left_bits;
right_bits = changed_bits >> (ctz + 2);
return left_
3201 - 3300 of 3756 matches
Mail list logo