Wrong code generated for 179.art with -mfpu=neon -O3 -marm
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Linaro GCC |
Fix Released
|
High
|
Andrew Stubbs | ||
Linaro GCC Tracking |
Won't Fix
|
Undecided
|
Unassigned | ||
gcc-4.5 (Ubuntu) |
Fix Released
|
Undecided
|
Unassigned |
Bug Description
179.art from SPECfp 2000 runs incorrectly when built using "-marm -mcpu=cortex-a8 -mfloat-abi=softfp -mfpu=neon -O3". It works correctly replacing -mfpu=vfp in place of neon. It's also not a problem with thumb-2 code.
It looks like the bad code is in weightadj()
Specifically, the VFP code is :
VLDRGT d3,[r1,#8]
VLDRLE d3,[pc,#228] ; [0x8d90] = 0
VMUL.F64 d5,d5,d3
Basically, load d3 with either a value from memory or 0 depending on the results of a previous compare.
The corresponding code in the NEON binary :
VLDRGT d19,[r1,#8]
VMOV.I32 d19,#0
VMUL.F64 d18,d18,d19
The VMOV.I32 is the NEON equivalent - it's good since it eliminates a memory access. Unfortunately, it should be a conditional VMOV to match the condition VLDR in the vfp code.
This is a problem in the September, October and December releases. I haven't yet caught up to the January release so it may already be fixed?
Changed in gcc-linaro: | |
status: | New → Confirmed |
Changed in gcc-linaro: | |
milestone: | none → 4.5-2011.02-0 |
Changed in gcc-linaro: | |
status: | Confirmed → Triaged |
importance: | Undecided → High |
Changed in gcc-linaro: | |
milestone: | 4.5-2011.02-0 → 4.5-2011.03-0 |
Changed in gcc-linaro: | |
status: | Fix Committed → Fix Released |
This is still a bug in the January release.
Looking at the dumps it appears as though this is because :
@(insn:TI 202 77 84 /home/ramrad01/ benchmarks/ cygdrive/ d/benchspec/ CFP2000/ 179.art/ src/scanner. c:76 (cond_exec (unle (reg:CCFPE 24 cc)
@ (const_int 0 [0x0]))
@ (set (reg/v:DF 101 d19 [orig:244 result ] [244])
@ (const_double:DF 0.0 [0x0.0p+0]))) 3026 {*p *movdf_vfp} (expr_list:REG_DEAD (reg:CCFPE 24 cc)
@ (nil)))
vmov.i32 d19, #0
And not printing the condition code correctly.