Slowdown in 175.vpr (using LDR from literal pool rather than MOVW/MOVT)
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Linaro GCC |
Fix Released
|
Medium
|
Zhenqiang Chen |
Bug Description
Testing 2011-10 versions of 4.6 vs 4.5, and I'm seeing a slowdown in 175.vpr from SPEC2000. From profiling, at least part of the slowdown is in get_non_
x = block[net[
y = block[net[
in 4.5, most of the array addresses were loaded using MOVW/MOVT pairs :
get_
0x0001178c: e3083fc0 .?.. MOV r3,#0x8fc0
0x00011790: e0800100 .... ADD r0,r0,r0,LSL #2
0x00011794: e340300c .0@. MOVT r3,#0xc
0x00011798: e5932000 . .. LDR r2,[r3,#0]
0x0001179c: e3083fbc .?.. MOV r3,#0x8fbc
0x000117a0: e92d05f0 ..-. PUSH {r4-r8,r10}
0x000117a4: e340300c .0@. MOVT r3,#0xc
0x000117a8: e5936000 .`.. LDR r6,[r3,#0]
0x000117ac: e0822100 .!.. ADD r2,r2,r0,LSL #2
0x000117b0: e9921080 .... LDMIB r2,{r7,r12}
0x000117b4: e59c3000 .0.. LDR r3,[r12,#0]
In 4.6, the MOVW/MOVT pairs have been replaced by LDRs from a literal pool :
get_
0x00011bc0: e59f30f4 .0.. LDR r3,[pc,#244] ; [0x11cbc] = 0xd01c8
0x00011bc4: e0800100 .... ADD r0,r0,r0,LSL #2
0x00011bc8: e92d05f0 ..-. PUSH {r4-r8,r10}
0x00011bcc: e59f20ec . .. LDR r2,[pc,#236] ; [0x11cc0] = 0xd0194
0x00011bd0: e5933000 .0.. LDR r3,[r3,#0]
0x00011bd4: e5926000 .`.. LDR r6,[r2,#0]
0x00011bd8: e0830100 .... ADD r0,r3,r0,LSL #2
0x00011bdc: e9901080 .... LDMIB r0,{r7,r12}
0x00011be0: e59c3000 .0.. LDR r3,[r12,#0]
This leads to much slower code since a MOVW/MOVT is faster than even an L1 hit for the loads.
I'm building using
arm-unknown-
I'm not sure of the legality of posting the full pre-processed source for this test, but hopefully enough people have access to it to reproduce this.
Changed in gcc-linaro: | |
assignee: | nobody → Ramana Radhakrishnan (ramana) |
importance: | Undecided → Medium |
Changed in gcc-linaro: | |
status: | New → Triaged |
Changed in gcc-linaro: | |
assignee: | Ramana Radhakrishnan (ramana) → Zhenqiang Chen (zhenqiang-chen) |
Changed in gcc-linaro: | |
status: | Triaged → Fix Released |
(hmm, vpr is under a non-free license so we can't post source)