[PATCH] D106408: Allow rematerialization of virtual reg uses

Stanislav Mekhanoshin via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jul 22 11:35:38 PDT 2021


rampitec marked 3 inline comments as done.
rampitec added inline comments.


================
Comment at: llvm/test/CodeGen/X86/licm-regpressure.ll:4
 ; correctly. More details: llvm.org/PR23143
-; XFAIL: *
+; It however passes because leaq is rematerialized instead of spilling.
 
----------------
jrtc27 wrote:
> rampitec wrote:
> > jrtc27 wrote:
> > > RKSimon wrote:
> > > > Add checks for the lea?
> > > Or fix the test so it still demonstrates the bug, otherwise this file no longer serves much of a purpose...
> > The question is: should LICM really check register pressure if we can rely on rematerialization instead? I have started this with a very similar situation in AMDGPU, LICM was hoisting instructions out of the loop and we end up spilling in the loop. A proper rematerialization fixes this without burdening the LICM. I.e. this change shall probably fix the bug itself.
> If this fixes the bug completely then rewrite the comments to reflect that and tag the revision as closing the bug. If it doesn't fix the bug in all cases then this test needs updating to be a case that's still broken.
Looking closely I think we cannot reproduce the bug with the asm inspection because rematerialization mitigates it. However, the issue reported in the PR23143 still exist. This can be explored with MIR inspection. Updated test accordingly.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D106408/new/

https://reviews.llvm.org/D106408



More information about the llvm-commits mailing list