[Bug analyzer/95152] internal compiler error: in get_or_create_mem_ref, at analyzer/region-model.cc:6938

2020-05-16 Thread fredrik.hederstie...@securitas-direct.com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95152 Fredrik Hederstierna changed: What|Removed |Added CC||fredrik.hederstierna@securi

[Bug analyzer/95152] ICE in get_or_create_mem_ref, at analyzer/region-model.cc:6938 since r10-5950-g757bf1dff5e8cee3

2020-05-17 Thread fredrik.hederstie...@securitas-direct.com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95152 --- Comment #4 from Fredrik Hederstierna --- Stripped down example: File : typedef struct { int var; } info_t; extern void *_data_offs; void test() { info_t *info = ((void *)((void *)1) + ((unsigned int)&_data_offs)); my_func(info->var

[Bug c/96847] New: Code size increase +42% depending on memory size allocated on stack for ARM Cortex-M3

2020-08-29 Thread fredrik.hederstie...@securitas-direct.com
Severity: normal Priority: P3 Component: c Assignee: unassigned at gcc dot gnu.org Reporter: fredrik.hederstie...@securitas-direct.com Target Milestone: --- Created attachment 49156 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=49156&acti

[Bug target/96847] Code size increase +42% depending on memory size allocated on stack for ARM Cortex-M3

2020-08-31 Thread fredrik.hederstie...@securitas-direct.com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96847 --- Comment #2 from Fredrik Hederstierna --- Ok thanks, just wanted also to clarify that the size increase was not actually due to changing array sizes, but it was difference between GCC-9.2 and GCC-10.2 for the _same_ array lengths. So GCC-10.2

[Bug c/50997] New: ARM: No warnings for unreachable code for ARM cross compiler

2011-11-06 Thread fredrik.hederstie...@securitas-direct.com
Severity: minor Priority: P3 Component: c AssignedTo: unassig...@gcc.gnu.org ReportedBy: fredrik.hederstie...@securitas-direct.com Created attachment 25729 --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=25729 Example file with warnings for unreacha

[Bug c/50997] ARM: No warnings for unreachable code for ARM cross compiler

2011-11-06 Thread fredrik.hederstie...@securitas-direct.com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50997 --- Comment #2 from Fredrik Hederstierna 2011-11-07 07:33:19 UTC --- Ok, I didn't know that checks for unreachable-code was removed. Though I would like to know about the background/discussion behind this decision - do anyone have a link or refe

[Bug c/50997] ARM: No warnings for unreachable code for ARM cross compiler

2011-11-07 Thread fredrik.hederstie...@securitas-direct.com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50997 --- Comment #3 from Fredrik Hederstierna 2011-11-07 21:11:13 UTC --- Ok, answer to myself. I found the patch: http://gcc.gnu.org/ml/gcc-patches/2009-11/msg00169.html I think the patch is very unfortunate, if I knew I should have objected. It's

[Bug c/52923] New: Warn if making external references to local stack memory

2012-04-10 Thread fredrik.hederstie...@securitas-direct.com
Severity: enhancement Priority: P3 Component: c AssignedTo: unassig...@gcc.gnu.org ReportedBy: fredrik.hederstie...@securitas-direct.com Created attachment 27123 --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=27123 Example code with functions returning w

[Bug c/52923] Warn if making external references to local stack memory

2012-04-10 Thread fredrik.hederstie...@securitas-direct.com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52923 --- Comment #4 from Fredrik Hederstierna 2012-04-10 12:52:36 UTC --- Maybe it have advantages to have a "pointer-deref" analysis pass rather than a "point-to" analysis pass. Then GCC could warn only if the pointer is being dereferenced for real,

[Bug c/85880] New: Different code generation for uninitialized variables

2018-05-22 Thread fredrik.hederstie...@securitas-direct.com
Component: c Assignee: unassigned at gcc dot gnu.org Reporter: fredrik.hederstie...@securitas-direct.com Target Milestone: --- Created attachment 44164 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=44164&action=edit Example file Starting with GCC-8.1.0 the code gen

[Bug c/85880] Different code generation for uninitialized variables

2018-05-22 Thread fredrik.hederstie...@securitas-direct.com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85880 --- Comment #1 from Fredrik Hederstierna --- Created attachment 44165 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=44165&action=edit Makefile

[Bug middle-end/85880] Different code generation for uninitialized variables

2018-05-22 Thread fredrik.hederstie...@securitas-direct.com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85880 --- Comment #2 from Fredrik Hederstierna --- All old GCC < 8 --- Disassembly of section .text: : 0: 2000movsr0, #0 2: 4770bx lr 0004 : 4: b500push{lr}

[Bug middle-end/85880] Different code generation for uninitialized variables

2018-05-22 Thread fredrik.hederstie...@securitas-direct.com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85880 --- Comment #4 from Fredrik Hederstierna --- Ok, you are probably right. I just was surprised that all GCC 4,5,6,7 gave same result, but something changed with 8. But you are right, its unpredictable results since its undefined. I practice it ga

[Bug c/90340] New: Not optimal code when compiling C library for vsnprintf, code size increase 17%

2019-05-03 Thread fredrik.hederstie...@securitas-direct.com
Severity: normal Priority: P3 Component: c Assignee: unassigned at gcc dot gnu.org Reporter: fredrik.hederstie...@securitas-direct.com Target Milestone: --- Created attachment 46284 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=46284&action=edit T

[Bug target/90340] Not optimal code when compiling C library for vsnprintf, code size increase 17%

2019-05-05 Thread fredrik.hederstie...@securitas-direct.com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90340 --- Comment #1 from Fredrik Hederstierna --- Stripped down the testcase some, this version gives +35% code size increase. With gcc-8.2.0 it was 536 bytes, when gcc-9.1.0 gives 724 bytes (+188 bytes).

[Bug target/90340] Not optimal code when compiling C library for vsnprintf, code size increase 17%

2019-05-05 Thread fredrik.hederstie...@securitas-direct.com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90340 --- Comment #2 from Fredrik Hederstierna --- Created attachment 46297 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=46297&action=edit Stripped down testcase, gives +35% code size increase Stripped down testcase, gives +35% code size incr

[Bug middle-end/90340] Not optimal code when compiling switch-case for size, code increase +35%

2019-05-06 Thread fredrik.hederstie...@securitas-direct.com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90340 --- Comment #5 from Fredrik Hederstierna --- I use patched sources from http://gcc.hederstierna.com/csibe I think you could download and try it out. Toolchain I build with https://github.com/fredrikhederstierna/buildbuddy Otherwise I think the

[Bug middle-end/90340] Not optimal code when compiling switch-case for size, code increase +35%

2019-05-06 Thread fredrik.hederstie...@securitas-direct.com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90340 --- Comment #8 from Fredrik Hederstierna --- Ok, thannks, I will try to have a look at it later tonight (I'm at my regular job now ;-) Thanks/Fredrik

[Bug middle-end/90340] Not optimal code when compiling switch-case for size, code increase +35%

2019-05-06 Thread fredrik.hederstie...@securitas-direct.com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90340 --- Comment #9 from Fredrik Hederstierna --- I did the test suggested, the results was as follows A. gcc-8.2.0 B. gcc-9.1.0 C. gcc-9.1.0 -fno-jump-tables D. gcc-9.1.0 patched "max_ratio_for_size = 2" Overall CSiBE was A: 2 413 510 bytes B: 2

[Bug middle-end/90340] Not optimal code when compiling switch-case for size, code increase +35%

2019-05-06 Thread fredrik.hederstie...@securitas-direct.com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90340 --- Comment #10 from Fredrik Hederstierna --- Tested also gcc-9.1.0 "max_ratio_for_size = 1" just out of curiosity results was similar compared to gcc-8.2.0: Overall CSiBE was 2 417 695 bytes (+4185 bytes, +0.17%) Example file CSiBE "vsprint

[Bug middle-end/90340] Not optimal code when compiling switch-case for size, code increase +35%

2019-05-13 Thread fredrik.hederstie...@securitas-direct.com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90340 --- Comment #16 from Fredrik Hederstierna --- Still you cannot reach code size as gcc-8.3.0 ? So something in new switch-case compilation generates larger code still?

[Bug middle-end/90340] Not optimal code when compiling switch-case for size, code increase +35%

2019-05-14 Thread fredrik.hederstie...@securitas-direct.com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90340 --- Comment #22 from Fredrik Hederstierna --- Was "max_ratio_for_size = 2" as default changed? Also changing this to "1" did not by far reach size of gcc-8.2 unfortunately, I guess we are assuming this code growth depends on other regression fro

[Bug middle-end/88784] Middle end is missing some optimizations about unsigned

2019-05-22 Thread fredrik.hederstie...@securitas-direct.com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88784 --- Comment #6 from Fredrik Hederstierna --- Created attachment 46397 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=46397&action=edit Some more patterns Looking into this I found some more places where it seems to be non-optimal code, ma

[Bug c/90705] New: Suboptimal register allocation on ARM when compiling for size

2019-06-01 Thread fredrik.hederstie...@securitas-direct.com
Priority: P3 Component: c Assignee: unassigned at gcc dot gnu.org Reporter: fredrik.hederstie...@securitas-direct.com Target Milestone: --- Created attachment 46441 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=46441&action=edit test.c When compili

[Bug target/9663] [arm] gcc-20030127 misses an optimization opportunity

2019-06-06 Thread fredrik.hederstie...@securitas-direct.com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=9663 Fredrik Hederstierna changed: What|Removed |Added CC||fredrik.hederstierna@securi

[Bug target/9663] [arm] gcc-20030127 misses an optimization opportunity

2019-06-06 Thread fredrik.hederstie...@securitas-direct.com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=9663 --- Comment #12 from Fredrik Hederstierna --- Created attachment 46458 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=46458&action=edit range ran through preprocessor using -E -P I'm not sure if this is what you wanted, but here is file st

[Bug target/61578] [4.9 regression] Code size increase for ARM thumb compared to 4.8.x when compiling with -Os

2016-03-20 Thread fredrik.hederstie...@securitas-direct.com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61578 --- Comment #38 from Fredrik Hederstierna --- I guess this 'meta-bugreport' have become lightly fuzzy with all kinds of CSiBE code size increase issues, so maybe better to identify these issues on a more detailed level and create smaller specifi

[Bug target/61578] [4.9 regression] Code size increase for ARM thumb compared to 4.8.x when compiling with -Os

2016-03-20 Thread fredrik.hederstie...@securitas-direct.com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61578 --- Comment #39 from Fredrik Hederstierna --- Created attachment 38036 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=38036&action=edit CSiBE results for arm thumb1 and thumb2 code generation for various toolchains. CSiBE results for arm

[Bug tree-optimization/67213] When compiling for size with -Os loops can get bigger after peeling

2016-03-21 Thread fredrik.hederstie...@securitas-direct.com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67213 --- Comment #4 from Fredrik Hederstierna --- I've investigated this issue some further, and I believe the problem might be that we allow too many iterations when doing complete peeling of loops on ARM. The heuristics in "tree-ssa-loop-ivcanon.c

[Bug c/70341] New: Code size increase on ARM cortex-m3 for switch statements

2016-03-21 Thread fredrik.hederstie...@securitas-direct.com
Priority: P3 Component: c Assignee: unassigned at gcc dot gnu.org Reporter: fredrik.hederstie...@securitas-direct.com Target Milestone: --- Created attachment 38049 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=38049&action=edit test_switch.c Starting w

[Bug target/61578] [4.9 regression] Code size increase for ARM thumb compared to 4.8.x when compiling with -Os

2016-03-21 Thread fredrik.hederstie...@securitas-direct.com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61578 --- Comment #41 from Fredrik Hederstierna --- Ok, I will mark this as resolved if noone object. I tried the ip-fixed again on master, but the gain was very little, so I do not think this is any way forward currently. I created this new separat

[Bug c/70341] Code size increase on ARM cortex-m3 for switch statements

2016-03-21 Thread fredrik.hederstie...@securitas-direct.com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70341 --- Comment #1 from Fredrik Hederstierna --- Created attachment 38051 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=38051&action=edit switch.c Added additional slightly larger test case that also show problems for cortex-m0 and thumb1.

[Bug target/70359] New: Code size increase for ARM compared to gcc-5.3.0

2016-03-22 Thread fredrik.hederstie...@securitas-direct.com
Component: target Assignee: unassigned at gcc dot gnu.org Reporter: fredrik.hederstie...@securitas-direct.com Target Milestone: --- Created attachment 38058 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=38058&action=edit inttostr.c Code size increase on master for ARM

[Bug target/70359] [6 Regression] Code size increase for ARM compared to gcc-5.3.0

2016-03-24 Thread fredrik.hederstie...@securitas-direct.com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70359 --- Comment #6 from Fredrik Hederstierna --- Thanks for your analysis on this. One comment on this 'complaint', it's not only about size - in my example the compiler uses 2 more regs push and pop, and several more instructions, so I think causin

[Bug target/70359] [6 Regression] Code size increase for ARM compared to gcc-5.3.0

2016-04-04 Thread fredrik.hederstie...@securitas-direct.com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70359 --- Comment #15 from Fredrik Hederstierna --- Created attachment 38185 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=38185&action=edit tok.c I took another example for CSiBE and stripped it down. I'm not 100% sure it is the exact same is

[Bug c/81524] New: Bogus or missing warnings when dereferencing pointer to deallocated stack memory

2017-07-23 Thread fredrik.hederstie...@securitas-direct.com
Severity: normal Priority: P3 Component: c Assignee: unassigned at gcc dot gnu.org Reporter: fredrik.hederstie...@securitas-direct.com Target Milestone: --- Created attachment 41814 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=41814&acti

[Bug c++/60517] warning/error for taking address of member of a temporary object

2017-07-24 Thread fredrik.hederstie...@securitas-direct.com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=60517 Fredrik Hederstierna changed: What|Removed |Added CC||fredrik.hederstierna@securi

[Bug c++/60517] warning/error for taking address of member of a temporary object

2017-07-24 Thread fredrik.hederstie...@securitas-direct.com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=60517 --- Comment #20 from Fredrik Hederstierna --- Simplest fix might be something like? - else + else if (access->grp_no_warning) so we do not always suppress warnings, but name will look funny for temp.

[Bug c++/60517] warning/error for taking address of member of a temporary object

2017-07-24 Thread fredrik.hederstie...@securitas-direct.com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=60517 --- Comment #21 from Fredrik Hederstierna --- Started with fix for PR 43347 to not warn on artificial aggregates https://gcc.gnu.org/bugzilla/show_bug.cgi?id=43347

[Bug c++/60517] warning/error for taking address of member of a temporary object

2017-07-25 Thread fredrik.hederstie...@securitas-direct.com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=60517 --- Comment #23 from Fredrik Hederstierna --- Ah ok, yes I think you are right. The check could possibly be in "cp/typeck.c" and "cp/tree.c"? but I'm not familiar with this C++ parsing code. Interesting that this code gets warning: B* foo(A

[Bug c/81524] Bogus or missing warnings when dereferencing pointer to deallocated stack memory

2017-07-25 Thread fredrik.hederstie...@securitas-direct.com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81524 --- Comment #3 from Fredrik Hederstierna --- Isn't AddressSanitizer checking in run-time? There are several tools that can find this bugs in runtime I think like Valgrind, but I need to find this at compile-time. I use embedded arm-eabi target

[Bug rtl-optimization/81625] GCC v4.7 ... v8 is bloating code by > 25% compared to v3.4

2017-08-01 Thread fredrik.hederstie...@securitas-direct.com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81625 Fredrik Hederstierna changed: What|Removed |Added CC||fredrik.hederstierna@securi

[Bug rtl-optimization/81625] GCC v4.7 ... v8 is bloating code by > 25% compared to v3.4

2017-08-07 Thread fredrik.hederstie...@securitas-direct.com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81625 --- Comment #5 from Fredrik Hederstierna --- I tried build several AVR toolchains from 3.4.6 to 7.1.0 and I can confirm that code size increases as described. I suspect for AVR this might start already from 3.x -> 4.x Checked Bug 17549 - [4.0 R

[Bug tree-optimization/67213] When compiling for size with -Os loops can get bigger after peeling

2017-05-06 Thread fredrik.hederstie...@securitas-direct.com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67213 --- Comment #5 from Fredrik Hederstierna --- Still same in GCC-7.1.0. I analyzed using -fdump-tree-cunroll-details void test_iter_6(void) { int i; for (i = 0; i < 6; i++) { data[i] = i; } } The function was generated "test_iter_6":

[Bug tree-optimization/67213] When compiling for size with -Os loops can get bigger after peeling

2017-05-06 Thread fredrik.hederstie...@securitas-direct.com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67213 --- Comment #6 from Fredrik Hederstierna --- Same thing for x86, not only ARM: bash# gcc --version gcc (Ubuntu 5.4.0-6ubuntu1~16.04.4) 5.4.0 20160609 bash# gcc -c test.c -Os --param max-completely-peel-times=5 bash# objdump -dath test.o Di

[Bug c/50584] No warning for passing small array to C99 static array declarator

2017-05-16 Thread fredrik.hederstie...@securitas-direct.com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=50584 Fredrik Hederstierna changed: What|Removed |Added CC||fredrik.hederstierna@securi

[Bug target/70341] [5/6/7 Regression] cost model for addresses is incorrect, slsr is using reg + reg + CST for arm

2016-09-04 Thread fredrik.hederstie...@securitas-direct.com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70341 --- Comment #8 from Fredrik Hederstierna --- Could it be something in tree-ssa-forwprop pass? This pass is executed 4 times in -Os, and starting with GCC-4.9 it seems like statements that seems to generate instructions that are hard to eliminat

[Bug target/70341] [5/6/7 Regression] cost model for addresses is incorrect, slsr is using reg + reg + CST for arm

2016-09-05 Thread fredrik.hederstie...@securitas-direct.com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70341 --- Comment #10 from Fredrik Hederstierna --- Can it be related to some missing code hoisting in eg. combiner or gcse? I found this old PR 11832 on similar issue, can it be related, or have a common solution? Bug 11832 - Optimization of common

[Bug rtl-optimization/59535] [4.9 regression] -Os code size regressions for Thumb1/Thumb2 with LRA

2014-06-12 Thread fredrik.hederstie...@securitas-direct.com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=59535 Fredrik Hederstierna changed: What|Removed |Added CC||fredrik.hederstierna@securi

[Bug c/61578] New: Code size increase for ARM thumb compared to 4.8.x when compiling with -Os

2014-06-21 Thread fredrik.hederstie...@securitas-direct.com
: normal Priority: P3 Component: c Assignee: unassigned at gcc dot gnu.org Reporter: fredrik.hederstie...@securitas-direct.com We have problems when trying to switch from GCC 4.8.3 to GCC 4.9.0 (arm-eabi thumb1 for arm966e-s core) due to significant code size

[Bug c/61578] Code size increase for ARM thumb compared to 4.8.x when compiling with -Os

2014-06-21 Thread fredrik.hederstie...@securitas-direct.com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61578 --- Comment #1 from Fredrik Hederstierna --- Created attachment 32980 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=32980&action=edit Toolchain build script.

[Bug c/61578] Code size increase for ARM thumb compared to 4.8.x when compiling with -Os

2014-06-21 Thread fredrik.hederstie...@securitas-direct.com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61578 --- Comment #2 from Fredrik Hederstierna --- Created attachment 32981 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=32981&action=edit Toolchain build script 4.9.0

[Bug c/61578] Code size increase for ARM thumb compared to 4.8.x when compiling with -Os

2014-06-21 Thread fredrik.hederstie...@securitas-direct.com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61578 --- Comment #3 from Fredrik Hederstierna --- Created attachment 32982 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=32982&action=edit Makefile for examples.

[Bug c/61578] Code size increase for ARM thumb compared to 4.8.x when compiling with -Os

2014-06-21 Thread fredrik.hederstie...@securitas-direct.com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61578 --- Comment #4 from Fredrik Hederstierna --- Created attachment 32983 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=32983&action=edit Example source 1.

[Bug c/61578] Code size increase for ARM thumb compared to 4.8.x when compiling with -Os

2014-06-21 Thread fredrik.hederstie...@securitas-direct.com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61578 --- Comment #5 from Fredrik Hederstierna --- Created attachment 32984 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=32984&action=edit Example source 2.

[Bug target/45207] The -Os flag generates wrong code for ARM966e-s

2014-06-21 Thread fredrik.hederstie...@securitas-direct.com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=45207 Fredrik Hederstierna changed: What|Removed |Added Status|WAITING |RESOLVED Resolution|---

[Bug target/61578] [4.9 regression] Code size increase for ARM thumb compared to 4.8.x when compiling with -Os

2015-09-02 Thread fredrik.hederstie...@securitas-direct.com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61578 --- Comment #23 from Fredrik Hederstierna --- Thanks for your patch, I tried it out, and it solves the small example fine, the code now is similar to GCC 4.8 for this particular example. Though when I ran the full CSiBE benchmark, the code size

[Bug target/67507] New: Code size increase with -Os from GCC 4.8.x to GCC 4.9.x for ARM thumb1

2015-09-08 Thread fredrik.hederstie...@securitas-direct.com
: normal Priority: P3 Component: target Assignee: unassigned at gcc dot gnu.org Reporter: fredrik.hederstie...@securitas-direct.com Target Milestone: --- Created attachment 36308 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=36308&action=edit Examp

[Bug target/61578] [4.9 regression] Code size increase for ARM thumb compared to 4.8.x when compiling with -Os

2015-09-08 Thread fredrik.hederstie...@securitas-direct.com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61578 --- Comment #25 from Fredrik Hederstierna --- I've but this last example in a separate issue: Bug 67507 - Code size increase with -Os from GCC 4.8.x to GCC 4.9.x for ARM thumb1. I've also previously put this one that causes size increase Bug 672

[Bug target/67366] Poor assembly generation for unaligned memory accesses on ARM v6 & v7 cpus

2015-10-11 Thread fredrik.hederstie...@securitas-direct.com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67366 Fredrik Hederstierna changed: What|Removed |Added CC||fredrik.hederstierna@securi

[Bug target/61578] [4.9/5 regression] Code size increase for ARM thumb compared to 4.8.x when compiling with -Os

2015-03-02 Thread fredrik.hederstie...@securitas-direct.com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61578 --- Comment #14 from Fredrik Hederstierna --- Created attachment 34916 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=34916&action=edit CSiBE benchmark with gnu89, updates with newer trunk as reference. I added attachment with new CSiBE m

[Bug target/61578] Code size increase for ARM thumb compared to 4.8.x when compiling with -Os

2014-11-02 Thread fredrik.hederstie...@securitas-direct.com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61578 --- Comment #9 from Fredrik Hederstierna --- Created attachment 33866 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=33866&action=edit Simple patch to exclude use of ip Simple patch that make it possible to optionally exclude use of ip fo

[Bug target/61578] Code size increase for ARM thumb compared to 4.8.x when compiling with -Os

2014-11-02 Thread fredrik.hederstie...@securitas-direct.com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61578 --- Comment #10 from Fredrik Hederstierna --- Created attachment 33867 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=33867&action=edit Size benchmark gcc 4.8, gcc 4.9 and trunk. Added updated CSiBE benchmark for GCC 4.8, GCC 4.9 and trun

[Bug rtl-optimization/59535] [4.9 regression] -Os code size regressions for Thumb1/Thumb2 with LRA

2014-09-03 Thread fredrik.hederstie...@securitas-direct.com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=59535 --- Comment #21 from Fredrik Hederstierna --- I filed this previously, maybe its duplicate Bug 61578 - Code size increase for ARM thumb compared to 4.8.x when compiling with -Os BR Fredrik

[Bug target/61578] Code size increase for ARM thumb compared to 4.8.x when compiling with -Os

2014-09-23 Thread fredrik.hederstie...@securitas-direct.com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61578 --- Comment #8 from Fredrik Hederstierna --- Created attachment 33544 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=33544&action=edit CSiBE test results size Attached some tests with CSiBE v2.1.1 for arm-eabi. It seems like the results a

[Bug tree-optimization/67213] New: When compiling for size with -Os loops can get bigger after peeling

2015-08-14 Thread fredrik.hederstie...@securitas-direct.com
Priority: P3 Component: tree-optimization Assignee: unassigned at gcc dot gnu.org Reporter: fredrik.hederstie...@securitas-direct.com Target Milestone: --- When compiling thumb1 code for size with -Os some loops can be larger due to complete peeling. Example

[Bug tree-optimization/67213] When compiling for size with -Os loops can get bigger after peeling

2015-08-14 Thread fredrik.hederstie...@securitas-direct.com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67213 --- Comment #1 from Fredrik Hederstierna --- Created attachment 36185 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=36185&action=edit Example files

[Bug tree-optimization/67213] When compiling for size with -Os loops can get bigger after peeling

2015-08-14 Thread fredrik.hederstie...@securitas-direct.com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67213 --- Comment #3 from Fredrik Hederstierna --- Created attachment 36186 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=36186&action=edit Dump from tree-ssa-loop-ivcanon.c In the function iter_6 it seems like it will keep cost 5 when unrolli

[Bug target/61578] [4.9 regression] Code size increase for ARM thumb compared to 4.8.x when compiling with -Os

2015-08-18 Thread fredrik.hederstie...@securitas-direct.com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61578 --- Comment #17 from Fredrik Hederstierna --- Created attachment 36201 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=36201&action=edit Simple example giving +50% code size increase compared gcc-4.8.5 and gcc-5.2.0 Simple example giving +

[Bug target/61578] [4.9 regression] Code size increase for ARM thumb compared to 4.8.x when compiling with -Os

2015-08-18 Thread fredrik.hederstie...@securitas-direct.com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61578 --- Comment #18 from Fredrik Hederstierna --- Created attachment 36202 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=36202&action=edit Disasm for -mthumb also, code size increase was +48%.

[Bug target/61578] [4.9 regression] Code size increase for ARM thumb compared to 4.8.x when compiling with -Os

2015-08-19 Thread fredrik.hederstie...@securitas-direct.com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61578 --- Comment #19 from Fredrik Hederstierna --- I'm not sure why bug 59535 was closed, same problem might still exist, quote: > Zhenqiang Chen 2014-09-03 06:17:44 UTC > > Here is a small case to show lra introduces one more register copy (tested

[Bug target/61578] [4.9 regression] Code size increase for ARM thumb compared to 4.8.x when compiling with -Os

2015-09-01 Thread fredrik.hederstie...@securitas-direct.com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61578 --- Comment #21 from Fredrik Hederstierna --- Great, thanks! Just a note as you are looking into this, neither GCC 4.8.x nor GCC 5.2.x produces the optimal code I think for this case, isn't it better to load result register r0, instead of go ov

[Bug c/46483] New: Built-in memcpy() does not handle unaligned int for ARM

2010-11-15 Thread fredrik.hederstie...@securitas-direct.com
: c AssignedTo: unassig...@gcc.gnu.org ReportedBy: fredrik.hederstie...@securitas-direct.com I had some problems with memcpy() when copying unaligned integers for ARM. For intel target it worked fine, and I concluded that if I overloaded gcclib weak memcpy-reference I had the same

[Bug c/46483] Built-in memcpy() does not handle unaligned int for ARM

2010-11-15 Thread fredrik.hederstie...@securitas-direct.com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46483 --- Comment #1 from Fredrik Hederstierna 2010-11-15 14:42:48 UTC --- Created attachment 22399 --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=22399 Script to build arm-elf toolchain

[Bug c/46765] New: Superfluous 'const' declaration does not generate error or warning

2010-12-02 Thread fredrik.hederstie...@securitas-direct.com
iority: P3 Component: c AssignedTo: unassig...@gcc.gnu.org ReportedBy: fredrik.hederstie...@securitas-direct.com Assume we want to declare a pointer to constant data. This can be done by e.g. int const * ptrToConst1; But C/C++ also accepts: //identical to:

[Bug c/46765] Superfluous 'const' declaration does not generate error or warning

2010-12-02 Thread fredrik.hederstie...@securitas-direct.com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46765 --- Comment #1 from Fredrik Hederstierna 2010-12-02 13:34:26 UTC --- Created attachment 22602 --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=22602 example file for const.

[Bug c/46766] New: Type 'void' is treated differently if used as return value or as parameter

2010-12-02 Thread fredrik.hederstie...@securitas-direct.com
iority: P3 Component: c AssignedTo: unassig...@gcc.gnu.org ReportedBy: fredrik.hederstie...@securitas-direct.com It is valid to return a void-function, or cast a variable to void, from a void-function. This makes some sense, in particular in C++ since we might have a tem

[Bug c/46766] Type 'void' is treated differently if used as return value or as parameter

2010-12-02 Thread fredrik.hederstie...@securitas-direct.com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46766 --- Comment #2 from Fredrik Hederstierna 2010-12-02 14:42:35 UTC --- Ok, but also f1() declares that it does not return any parameters, still it can return (void)0; I'm not saying either is wrong, I just though it should be consistent. If its o

[Bug c/46766] Type 'void' is treated differently if used as return value or as parameter

2010-12-02 Thread fredrik.hederstie...@securitas-direct.com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46766 --- Comment #4 from Fredrik Hederstierna 2010-12-02 15:55:05 UTC --- Yes, I agree its EURGH. I guess its not preferred to make C++ template-alike code in C. I think its worth avoid stuff like: #ifdef BLAH_BLAH_BLAH #define RETURN_TYPE_C_TEMPLA

[Bug target/70341] [5/6/7 Regression] cost model for addresses is incorrect, slsr is using reg + reg + CST for arm

2016-08-28 Thread fredrik.hederstie...@securitas-direct.com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70341 --- Comment #7 from Fredrik Hederstierna --- Tested with GCC 6.2 and still same behaviour.

[Bug target/70359] [6/7 Regression] Code size increase for ARM compared to gcc-5.3.0

2016-08-28 Thread fredrik.hederstie...@securitas-direct.com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70359 --- Comment #19 from Fredrik Hederstierna --- Tested GCC-6.2, still same behavior.