[Bug rtl-optimization/87871] [9 Regression] testcases fail after r265398 on arm

bergner at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Tue Apr 16 15:23:00 GMT 2019


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

--- Comment #26 from Peter Bergner <bergner at gcc dot gnu.org> ---
(In reply to Vladimir Makarov from comment #25)
> (In reply to Peter Bergner from comment #24)
>> I don't know why r0 isn't in profitable_regs for pseudo 116.
>  
> Profitable regs there contain also conflict regs.  R0 is conflicting with
> p106. If R0 usage (in call insn) were in the same BB, your new conflict
> calculation found that there is no actual conflict.  But IRA uses
> df-infrastructure which tells IRA that R0 lives at the BB end where p106
> occurs.

I'm sorry, but I don't see where p116 conflicts with r0.  Can you show me
where/how?  Looking at my IRA dump, I see:


+++Allocating 40 bytes for conflict table (uncompressed size 48)
;; a0(r111,l0) conflicts: a2(r114,l0) a1(r113,l0) a3(r112,l0)
;;     total conflict hard regs:
;;     conflict hard regs:

;; a1(r113,l0) conflicts: a0(r111,l0) a2(r114,l0) a3(r112,l0)
;;     total conflict hard regs:
;;     conflict hard regs:

;; a2(r114,l0) conflicts: a0(r111,l0) a1(r113,l0)
;;     total conflict hard regs:
;;     conflict hard regs:

;; a3(r112,l0) conflicts: a0(r111,l0) a1(r113,l0) a4(r117,l0)
;;     total conflict hard regs: 0 12 14
;;     conflict hard regs: 0 12 14

;; a4(r117,l0) conflicts: a3(r112,l0)
;;     total conflict hard regs:
;;     conflict hard regs:

;; a5(r116,l0) conflicts:  cp0:a0(r111)<->a4(r117)@330:move
  cp1:a2(r114)<->a3(r112)@41:shuffle
  cp2:a3(r112)<->a5(r116)@125:shuffle
  pref0:a0(r111)<-hr0@2000
  pref1:a4(r117)<-hr0@660
  pref2:a5(r116)<-hr0@1000
  regions=1, blocks=6, points=10
    allocnos=6 (big 0), copies=3, conflicts=0, ranges=6

Note: I'm assuming we're missing a \n after p116's empty conflicts above?

So I don't see p116 conflict with r0, but I do see we register a shuffle
between p112 and p116 and p112 does (correctly) conflict with r0.  Is it really
the shuffle between p112 and p116 that is preventing us from putting r0 into
p116's profitable regs in the hope the p112 and p116 may get assigned the same
reg allowing the removal of the copy?  If so, that shuffle, since it's attached
to the setting of the CC reg cannot actually be removed even if p112 and p116
are assigned the same register.  Should we just ignore those types of
shuffles/copies that have other side effects?


More information about the Gcc-bugs mailing list