[PATCH] D89855: [PowerPC] Extend folding RLWINM + RLWINM to post-RA.
    Kai Luo via Phabricator via llvm-commits 
    llvm-commits at lists.llvm.org
       
    Wed Dec 16 19:32:37 PST 2020
    
    
  
lkail added inline comments.
================
Comment at: llvm/lib/Target/PowerPC/PPCInstrInfo.cpp:3260
+    SrcMI = MRI->getVRegDef(FoldingReg);
+  } else {
+    SrcMI = getDefMIPostRA(FoldingReg, MI, OtherIntermediateUse);
----------------
shchenz wrote:
> lkail wrote:
> > I suggest checking `Register::isPhysicalRegister` explicitly, since `Reg` might also be a stackslot.
> Could you please explain more here? this is after RA, if `FoldingReg` is a stackslot, we should get `r1/x1`? I don't understand how `Register::isPhysicalRegister` would change the semantic here? Thanks.
If it's the case, an assertion here would be better.
Repository:
  rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D89855/new/
https://reviews.llvm.org/D89855
    
    
More information about the llvm-commits
mailing list