[Bug rtl-optimization/70751] [7 Regression] FAIL: gcc.target/arm/eliminate.c scan-assembler-times r0,[\\t ]*sp 3 since r235184
jiwang at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Fri Jun 3 15:05:00 GMT 2016
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70751
--- Comment #2 from Jiong Wang <jiwang at gcc dot gnu.org> ---
Vlad,
Do you have any comments on this regression?
*arm_movsi_insn has the following operand constraints:
operand 0: "=rk,r,r,r,rk,m"
operand 1: "rk, I,K,j,mi,rk"
As r235184 won't explicitly refuse an unmatch CT_MEMORY operand, alternative
(alt) 4 got a chance to compete with alt 0, and eventually be the winner as
it's with rld_nregs=0 while alt 0 is with rld_nregs=1.
I am thinking it's OK to give alt 4 a chance here, but we should calculate the
cost correctly
For alt 4, it should be treated as a "Spill pseudo into memory" then there
will be reject+=3, but unfortunately the check for spill to memory is:
if (no_regs_p && REG_P (op) && hard_regno[nop] >= 0)
While the op for this case is not REG_P after equiv substitution.
(plus:SI (reg/f:SI 102 sfp)
(const_int 4 [0x4]))
reloading check dump pasted:
before
===
Changing pseudo 110 in operand 1 of insn 6 on equiv sfp:SI+0x4
1 Non-pseudo reload: reject+=2
1 Non input pseudo reload: reject++
alt=0,overall=9,losers=1,rld_nregs=1
alt=1: Bad operand -- refuse
alt=2: Bad operand -- refuse
alt=3: Bad operand -- refuse
alt=4: Bad operand -- refuse
0 Non-pseudo reload: reject+=2
0 Spill pseudo into memory: reject+=3
0 Non input pseudo reload: reject++
alt=5,overall=12,losers=1 -- refuse
Choosing alt 0 in insn 6: (0) =rk (1) rk {*arm_movsi_insn}
after
===
Changing pseudo 110 in operand 1 of insn 6 on equiv sfp:SI+0x4
1 Non-pseudo reload: reject+=2
1 Non input pseudo reload: reject++
alt=0,overall=9,losers=1,rld_nregs=1
alt=1: Bad operand -- refuse
alt=2: Bad operand -- refuse
alt=3: Bad operand -- refuse
1 Non-pseudo reload: reject+=2
1 Non input pseudo reload: reject++
alt=4,overall=9,losers=1,rld_nregs=0
0 Non-pseudo reload: reject+=2
0 Spill pseudo into memory: reject+=3
0 Non input pseudo reload: reject++
alt=5,overall=12,losers=1 -- refuse
Choosing alt 4 in insn 6: (0) rk (1) mi {*arm_movsi_insn}
More information about the Gcc-bugs
mailing list