[Bug rtl-optimization/117128] [15 regression] GCC trunk generates larger code than GCC 14 at -Os/Oz since r14-2161-g237e83e2158a3d

2024-11-06 Thread dccitaliano at gmail dot com via Gcc-bugs
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) {

[Bug target/117278] [12/13/14/15 regression] Code at -Os is larger on trunk than GCC 11.4.0 since r12-6149-gdc1969dab39266

2024-11-06 Thread dccitaliano at gmail dot com via Gcc-bugs
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

[Bug target/117278] [12/13/14/15 regression] Code at -Os is larger on trunk than GCC 11.4.0 since r12-6149-gdc1969dab39266

2024-11-06 Thread dccitaliano at gmail dot com via Gcc-bugs
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++) {

[Bug target/117253] [14/15 regression] Generated code at -Os on trunk is larger than GCC 13.3

2024-10-25 Thread dccitaliano at gmail dot com via Gcc-bugs
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-

[Bug rtl-optimization/117278] New: [12/13/14/15 regression] Code at -Os is larger on trunk than GCC 11.4.0

2024-10-23 Thread dccitaliano at gmail dot com via Gcc-bugs
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

[Bug middle-end/117271] [13/14/15 regression] GCC trunk emits larger code at -Os than 12.4.0

2024-10-23 Thread dccitaliano at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=117271 --- Comment #1 from Davide Italiano --- https://godbolt.org/z/eExfPsjzs

[Bug middle-end/117271] New: [13/14/15 regression] GCC trunk emits larger code at -Os than 12.4.0

2024-10-23 Thread dccitaliano at gmail dot com via Gcc-bugs
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

[Bug rtl-optimization/117128] [15 regression] GCC trunk generates larger code than GCC 14 at -Os/Oz since r14-2161-g237e83e2158a3d

2024-10-22 Thread dccitaliano at gmail dot com via Gcc-bugs
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; } }

[Bug target/117253] [14/15 regression] Generated code at -Os on trunk is larger than GCC 13.3

2024-10-22 Thread dccitaliano at gmail dot com via Gcc-bugs
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

[Bug target/117253] [14/15 regression] Generated code at -Os on trunk is larger than GCC 13.3

2024-10-22 Thread dccitaliano at gmail dot com via Gcc-bugs
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

[Bug target/117253] [14/15 regression] Generated code at -Os on trunk is larger than GCC 13.3

2024-10-21 Thread dccitaliano at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=117253 Davide Italiano changed: What|Removed |Added CC||rguenth at gcc dot gnu.org --- Commen

[Bug tree-optimization/117253] New: [14/15 regression] Generated code at -Os on trunk is larger than GCC 13.3

2024-10-21 Thread dccitaliano at gmail dot com via Gcc-bugs
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

[Bug target/116994] [15 regression] GCC trunk generates larger code than GCC 14 at -Os

2024-10-15 Thread dccitaliano at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=116994 Davide Italiano changed: What|Removed |Added CC||lingling.kong7 at gmail dot com --- C

[Bug middle-end/117123] [14/15 regression] Generated code at -Os on trunk is larger than GCC 14.4

2024-10-15 Thread dccitaliano at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=117123 Davide Italiano changed: What|Removed |Added CC||pheeck at gcc dot gnu.org,

[Bug middle-end/117160] New: [15 regression] GCC trunk generates larger code than GCC 14 at -Os/-Oz (progressed in 14)

2024-10-15 Thread dccitaliano at gmail dot com via Gcc-bugs
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

[Bug target/117128] [15 regression] GCC trunk generates larger code than GCC 14 at -Os/Oz

2024-10-15 Thread dccitaliano at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=117128 Davide Italiano changed: What|Removed |Added CC||rguenth at gcc dot gnu.org --- Commen

[Bug middle-end/117123] [12/13/14/15 regression] Generated code at -Os on trunk is larger than GCC 14.4

2024-10-13 Thread dccitaliano at gmail dot com via Gcc-bugs
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

[Bug middle-end/117128] New: [15 regression] GCC trunk generates larger code than GCC 14 at -Os/OZ

2024-10-13 Thread dccitaliano at gmail dot com via Gcc-bugs
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

[Bug middle-end/117123] New: [12/13/14/15 regression] Generated code at -Os on trunk is larger than GCC 14.4

2024-10-13 Thread dccitaliano at gmail dot com via Gcc-bugs
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

[Bug target/117103] GCC trunk emits push + pop at -Oz when a mov could suffice

2024-10-11 Thread dccitaliano at gmail dot com via Gcc-bugs
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

[Bug target/117103] New: GCC trunk emits push + pop at -Oz when a mov could suffice

2024-10-11 Thread dccitaliano at gmail dot com via Gcc-bugs
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

[Bug tree-optimization/117033] GCC trunk emits larger code at -Os compared to -O2

2024-10-08 Thread dccitaliano at gmail dot com via Gcc-bugs
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

[Bug tree-optimization/117033] GCC trunk emits larger code at -Os compared to -O2

2024-10-08 Thread dccitaliano at gmail dot com via Gcc-bugs
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

[Bug tree-optimization/117033] GCC trunk emits larger code at -Oz compared to -O2

2024-10-08 Thread dccitaliano at gmail dot com via Gcc-bugs
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.

[Bug tree-optimization/117033] GCC trunk emits larger code at -Oz compared to -O2

2024-10-08 Thread dccitaliano at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=117033 Davide Italiano changed: What|Removed |Added Blocks|103916 | Summary|GCC trunk emits l

[Bug middle-end/117033] New: GCC trunk emits larger code at -Oz compared to -O2

2024-10-08 Thread dccitaliano at gmail dot com via Gcc-bugs
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

[Bug target/117006] New: [15 regression] GCC trunk generates larger code than GCC 14 at -Os

2024-10-07 Thread dccitaliano at gmail dot com via Gcc-bugs
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

[Bug middle-end/116994] New: [15 regression] GCC trunk generates larger code than GCC 14 at -Os

2024-10-06 Thread dccitaliano at gmail dot com via Gcc-bugs
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

[Bug middle-end/116868] New: GCC trunk doesn't eliminate a superfluous new/delete pair

2024-09-27 Thread dccitaliano at gmail dot com via Gcc-bugs
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

[Bug middle-end/116753] [13/14/15 Regression] GCC trunk (-O3) can't fold a loop into a constant

2024-09-18 Thread dccitaliano at gmail dot com via Gcc-bugs
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

[Bug middle-end/116753] New: [regression from GCC 12.4] GCC trunk (-O3) can't fold a loop into a constant

2024-09-17 Thread dccitaliano at gmail dot com via Gcc-bugs
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

[Bug middle-end/116751] New: GCC trunk (-O3) doesn't optimize a loop that can be folded into a constant

2024-09-17 Thread dccitaliano at gmail dot com via Gcc-bugs
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: