https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80148

--- Comment #4 from Vladimir Makarov <vmakarov at gcc dot gnu.org> ---
Thank you for reporting this.

Something is wrong with processing insns for reloads.  The asm-insn hash 2 the
same operands mem[r263+12].  R263 is spilled for a reload.  The mem becomes
invalid and r263 should be reloaded too.  Instead, LRA goes to a spill sub-pass
changing the operands on mem[mem[sp+offset]], then it generates 2 reloads for
the both operands:

p1=mem[sp+offset]
p2=mem[sp+offset]

LRA can not figure out that p1 and p2 do not conflict and should be the same
(in LRA it is done on pseudo bases).

So the solution would be a generation of reloads for R263 before the spill
sub-pass.

When I find why does not it happen, I could say how much time will it take to
fix.  If it is simple, the patch will be probably ready tomorrow.

Reply via email to