[llvm] [AArch64][GlobalISel] Add support for post-indexed loads/stores. (PR #69532)

Jon Roelofs via llvm-commits llvm-commits at lists.llvm.org
Thu Oct 19 09:45:14 PDT 2023


================
@@ -605,6 +605,35 @@ bool AArch64RegisterBankInfo::onlyDefinesFP(const MachineInstr &MI,
   return hasFPConstraints(MI, MRI, TRI, Depth);
 }
 
+bool AArch64RegisterBankInfo::isLoadFromFPType(const MachineInstr &MI) const {
+  // GMemOperation because we also want to match indexed loads.
+  auto *Load = dyn_cast<GMemOperation>(&MI);
+
+  const auto &MMO = Load->getMMO();
----------------
jroelofs wrote:

`dyn_cast` followed by unconditional dereference. Either check the result & return, or change to a `cast<>`

https://github.com/llvm/llvm-project/pull/69532


More information about the llvm-commits mailing list