Activity log for bug #637882

Date Who What changed Old value New value Message
2010-09-14 08:36:58 Yao Qi bug added bug
2010-09-14 08:36:58 Yao Qi attachment added test case https://bugs.launchpad.net/bugs/637882/+attachment/1581987/+files/extra_ldr_mov.c
2010-09-28 01:54:30 Michael Hope tags size task
2012-05-31 07:47:11 Ramana Radhakrishnan gcc-linaro: importance Undecided Low
2012-05-31 07:47:16 Ramana Radhakrishnan gcc-linaro: status New Triaged
2012-05-31 07:47:25 Ramana Radhakrishnan description Test case is reduced from CINT2000/175.vpr/util.c:free_chunk_memory(), and compile it with GCC FSF trunk, $ arm-none-linux-gnueabi-gcc --version arm-none-linux-gnueabi-gcc (GCC) 4.6.0 20100902 (experimental) Copyright (C) 2010 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. $ arm-none-linux-gnueabi-gcc -march=armv7-a -mthumb -Os -O3 -mcpu=cortex-a9 -S extra_ldr_mov.c GCC generates code like this, free_chunk_memory: @ args = 0, pretend = 0, frame = 0 @ frame_needed = 0, uses_anonymous_args = 0 push {r3, r4, r5, lr} cbz r0, .L1 mov r4, r0 b .L3 .L4: mov r4, r5 // <---[2] .L3: ldr r0, [r4, #0] bl free ldr r5, [r4, #4] // <---[1] mov r0, r4 // <--- [3] bl free cmp r5, #0 bne .L4 We can exchange instruction [1] and [3], and change instruction [1] to 'ldr r4, [r4, #4]', then instruction [2] can be removed. Test case is reduced from CINT2000/175.vpr/util.c:free_chunk_memory(), and compile it with GCC FSF trunk, $ arm-none-linux-gnueabi-gcc --version arm-none-linux-gnueabi-gcc (GCC) 4.6.0 20100902 (experimental) Copyright (C) 2010 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. $ arm-none-linux-gnueabi-gcc -march=armv7-a -mthumb -Os -O3 -mcpu=cortex-a9 -S extra_ldr_mov.c GCC generates code like this, free_chunk_memory:         @ args = 0, pretend = 0, frame = 0         @ frame_needed = 0, uses_anonymous_args = 0         push {r3, r4, r5, lr}         cbz r0, .L1         mov r4, r0         b .L3 .L4:         mov r4, r5 // <---[2] .L3:         ldr r0, [r4, #0]         bl free         ldr r5, [r4, #4] // <---[1]         mov r0, r4 // <--- [3]         bl free         cmp r5, #0         bne .L4 We can exchange instruction [1] and [3], and change instruction [1] to 'ldr r4, [r4, #4]', then instruction [2] can be removed.
2014-06-09 02:42:46 Michael Collison gcc-linaro: status Triaged Won't Fix