https://gcc.gnu.org/bugzilla/show_bug.cgi?id=117128
--- Comment #6 from Davide Italiano ---
Yet another example:
int f(int* a) {
int sum = *a;
for (int i = 0; i < 10; i++) {
if (i % 2 == 0 && (i > 3 || *a < 5)) {
for (int j = 0; j < 5; j++) {
if (j > 2 && sum > 0) {
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=117278
--- Comment #4 from Davide Italiano ---
(In reply to Davide Italiano from comment #3)
> Another example that I found while looking at this:
>
> int f(int* a) {
> int sum = *a;
> for (int i = 0; i < 10; i++) {
> if (i % 2 == 0 && (i > 3
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=117278
--- Comment #3 from Davide Italiano ---
Another example that I found while looking at this:
int f(int* a) {
int sum = *a;
for (int i = 0; i < 10; i++) {
if (i % 2 == 0 && (i > 3 || *a < 5)) {
for (int j = 0; j < 5; j++) {
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=117253
--- Comment #7 from Davide Italiano ---
(In reply to Richard Biener from comment #4)
> So probably IVOPTs related. With -fno-ivopts code generated by GCC 13 and
> trunk are about the same size.
For the second example (see code above) -- `-fno-
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=117278
Bug ID: 117278
Summary: [12/13/14/15 regression] Code at -Os is larger on
trunk than GCC 11.4.0
Product: gcc
Version: 15.0
Status: UNCONFIRMED
Severity: normal
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=117271
--- Comment #1 from Davide Italiano ---
https://godbolt.org/z/eExfPsjzs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=117271
Bug ID: 117271
Summary: [13/14/15 regression] GCC trunk emits larger code at
-Os than 12.4.0
Product: gcc
Version: 15.0
Status: UNCONFIRMED
Severity: normal
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=117128
--- Comment #5 from Davide Italiano ---
Another example:
int f(int a) {
int arr[5];
for (int i = 0; i < 5; i++) {
if (i % 2 == 0 && a > 5 || i % 3 == 0 && a < -2) {
arr[i] = a + i * 2;
} else {
arr[i] = a + i;
}
}
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=117253
--- Comment #6 from Davide Italiano ---
(In reply to Richard Biener from comment #4)
> So probably IVOPTs related. With -fno-ivopts code generated by GCC 13 and
> trunk are about the same size.
Slightly less contrived example that points to th
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=117253
--- Comment #5 from Davide Italiano ---
(In reply to Sam James from comment #3)
> Davide, was this reduced from a real application or are you
> fuzzing/experimenting? (The reports are welcome either way.)
Hi Sam, these are not reduced by a real
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=117253
Davide Italiano changed:
What|Removed |Added
CC||rguenth at gcc dot gnu.org
--- Commen
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=117253
Bug ID: 117253
Summary: [14/15 regression] Generated code at -Os on trunk is
larger than GCC 13.3
Product: gcc
Version: 15.0
Status: UNCONFIRMED
Severity: norm
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=116994
Davide Italiano changed:
What|Removed |Added
CC||lingling.kong7 at gmail dot com
--- C
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=117123
Davide Italiano changed:
What|Removed |Added
CC||pheeck at gcc dot gnu.org,
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=117160
Bug ID: 117160
Summary: [15 regression] GCC trunk generates larger code than
GCC 14 at -Os/-Oz (progressed in 14)
Product: gcc
Version: 15.0
Status: UNCONFIRMED
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=117128
Davide Italiano changed:
What|Removed |Added
CC||rguenth at gcc dot gnu.org
--- Commen
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=117123
--- Comment #1 from Davide Italiano ---
I'd like to point out that in GCC-13.3 this seems to emit much shorter code:
i.e. https://godbolt.org/z/YEvbs14PY
_Z8patatinoi:
movl%edi, %eax
cmpl$5, %edi
jle .L2
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=117128
Bug ID: 117128
Summary: [15 regression] GCC trunk generates larger code than
GCC 14 at -Os/OZ
Product: gcc
Version: unknown
Status: UNCONFIRMED
Severity: norma
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=117123
Bug ID: 117123
Summary: [12/13/14/15 regression] Generated code at -Os on
trunk is larger than GCC 14.4
Product: gcc
Version: unknown
Status: UNCONFIRMED
Sever
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=117103
--- Comment #3 from Davide Italiano ---
> Note if you are doing code size comparison, then looking at the # of
> instructions for a target like x86 is not the way to go. You need to actually
> look at the assembled instruction output.
Oops, m
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=117103
Bug ID: 117103
Summary: GCC trunk emits push + pop at -Oz when a mov could
suffice
Product: gcc
Version: unknown
Status: UNCONFIRMED
Severity: normal
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=117033
--- Comment #8 from Davide Italiano ---
(In reply to Andrew Pinski from comment #7)
> (In reply to Davide Italiano from comment #6)
> > I noticed you linked the LLVM bug I found.
> > As part of my search/analysis, I found out there are cases th
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=117033
--- Comment #6 from Davide Italiano ---
I noticed you linked the LLVM bug I found.
As part of my search/analysis, I found out there are cases that sometimes clang
gets but GCC doesn't (unsurprisingly, FWIW).
Here's a simple one.
https://godbol
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=117033
--- Comment #3 from Davide Italiano ---
(In reply to Davide Italiano from comment #2)
> Sorry, modified the title. This is `-Oz`, not `-Os`
Writing this because you mentioned it blocks `-Os`, fwiw.
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=117033
Davide Italiano changed:
What|Removed |Added
Blocks|103916 |
Summary|GCC trunk emits l
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=117033
Bug ID: 117033
Summary: GCC trunk emits larger code at -Oz compared to -O2
Product: gcc
Version: unknown
Status: UNCONFIRMED
Severity: normal
Priority: P3
Compo
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=117006
Bug ID: 117006
Summary: [15 regression] GCC trunk generates larger code than
GCC 14 at -Os
Product: gcc
Version: unknown
Status: UNCONFIRMED
Severity: normal
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=116994
Bug ID: 116994
Summary: [15 regression] GCC trunk generates larger code than
GCC 14 at -Os
Product: gcc
Version: unknown
Status: UNCONFIRMED
Severity: normal
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=116868
Bug ID: 116868
Summary: GCC trunk doesn't eliminate a superfluous new/delete
pair
Product: gcc
Version: unknown
Status: UNCONFIRMED
Severity: normal
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=116753
--- Comment #3 from dcci ---
Slightly easier example that still fails (no nested loop):
```
long patatino() {
long x = 0;
while (x < 10) {
if (x % 2 == 0) {
x += 2;
} else {
x += 1
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=116753
Bug ID: 116753
Summary: [regression from GCC 12.4] GCC trunk (-O3) can't fold
a loop into a constant
Product: gcc
Version: unknown
Status: UNCONFIRMED
Severity
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=116751
Bug ID: 116751
Summary: GCC trunk (-O3) doesn't optimize a loop that can be
folded into a constant
Product: gcc
Version: unknown
Status: UNCONFIRMED
Severity:
32 matches
Mail list logo