[Bug rtl-optimization/64616] Redundant ldr when accessing var inside and outside a loop
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64616 Thomas Preud'homme changed: What|Removed |Added Status|ASSIGNED|RESOLVED Resolution|--- |FIXED --- Comment #6 from Thomas Preud'homme --- (In reply to Martin Liška from comment #5) > Can the bug be marked as resolved? Yes, fixed in GCC 6 onward.
[Bug rtl-optimization/64616] Redundant ldr when accessing var inside and outside a loop
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64616 Martin Liška changed: What|Removed |Added CC||marxin at gcc dot gnu.org --- Comment #5 from Martin Liška --- Can the bug be marked as resolved?
[Bug rtl-optimization/64616] Redundant ldr when accessing var inside and outside a loop
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64616 --- Comment #4 from Thomas Preud'homme thopre01 at gcc dot gnu.org --- Author: thopre01 Date: Wed May 13 05:39:14 2015 New Revision: 223113 URL: https://gcc.gnu.org/viewcvs?rev=223113root=gccview=rev Log: 2015-05-13 Thomas Preud'homme thomas.preudho...@arm.com gcc/ PR rtl-optimization/64616 * loop-invariant.c (can_move_invariant_reg): New. (move_invariant_reg): Call above new function to decide whether instruction can just be moved, skipping creation of temporary register. gcc/testsuite/ PR rtl-optimization/64616 * gcc.dg/loop-8.c: New test. * gcc.dg/loop-9.c: New test. Added: trunk/gcc/testsuite/gcc.dg/loop-8.c trunk/gcc/testsuite/gcc.dg/loop-9.c Modified: trunk/gcc/ChangeLog trunk/gcc/loop-invariant.c trunk/gcc/testsuite/ChangeLog
[Bug rtl-optimization/64616] Redundant ldr when accessing var inside and outside a loop
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64616 --- Comment #3 from Thomas Preud'homme thopre01 at gcc dot gnu.org --- *** Bug 64458 has been marked as a duplicate of this bug. ***
[Bug rtl-optimization/64616] Redundant ldr when accessing var inside and outside a loop
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64616 thopre01 at gcc dot gnu.org changed: What|Removed |Added Status|UNCONFIRMED |ASSIGNED Last reconfirmed||2015-01-16 Assignee|unassigned at gcc dot gnu.org |thopre01 at gcc dot gnu.org Ever confirmed|0 |1
[Bug rtl-optimization/64616] Redundant ldr when accessing var inside and outside a loop
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64616 thopre01 at gcc dot gnu.org changed: What|Removed |Added Target||arm-none-eabi --- Comment #1 from thopre01 at gcc dot gnu.org --- At least with -mcpu=cortex-m3 and -mthumb. I haven't tried other combinations yet.
[Bug rtl-optimization/64616] Redundant ldr when accessing var inside and outside a loop
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64616 --- Comment #2 from thopre01 at gcc dot gnu.org --- For arm-none-linux-gnueabihf-gcc configured with --with-arch=armv7-a and compiling without any -mcpu (so default cpu) the problem is also there: stmfd sp!, {r4, r5, r6, lr} movwr5, #:lower16:glob movtr5, #:upper16:glob .L2: ldr r0, [r5] movwr4, #:lower16:glob bl g movtr4, #:upper16:glob cmp r0, #0 bne .L2 mov r3, #1 str r3, [r4] ldmfd sp!, {r4, r5, r6, pc} This is due to pre introducing a new pseudoregister to load the address of glob and cprop propagating it only locally in the same basic block but not globally into the store.