[PATCH] D81586: [ARM] Describe defs/uses of VLLDM and VLSTM

Eli Friedman via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jun 10 13:21:43 PDT 2020


efriedma added inline comments.


================
Comment at: llvm/lib/Target/ARM/ARMExpandPseudoInsts.cpp:1280
+  for (int I = 0; I < 7; ++I)
+    VLSTM.addReg(ARM::Q0 + I, RegState::Implicit | RegState::Undef);
 
----------------
chill wrote:
> efriedma wrote:
> > RegState::Undef seems wrong: presumably the registers may actually contain data we need to preserve, or we wouldn't bother saving them in the first place.
> Saving/restoring is fine even if we didn't have to.
> 
> The "undef" is because we don't want to require the register to be defined at the point before the `vlstm`. Defined or not, we save then restore, don't care about values.
> 
> Otherwise, the machine verifier complains about the use of undefined register.
> 
> Is it possible for the scheduler to reorder a def after the "undef"-ed use in `vlstm` ? If yes, indeed, that'd be a problem, in which case maybe we can just set the insn as a scheduling barrier.
> 
Generally, registers which are explicitly saved by the callee are part of the live-in list of the entry block.  The "definition" comes from the caller.  I would expect save/restore of the FP registers here to work the same way.


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

https://reviews.llvm.org/D81586





More information about the llvm-commits mailing list