[PATCH] D74005: [GlobalISel][AArch64] Fix contract cross-bank copies with SIMD instructions

Jessica Paquette via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Feb 4 16:14:05 PST 2020


paquette added a comment.

Thanks for fixing this!

Can you attach a MIR testcase based off the one from the bugzilla bug?



================
Comment at: llvm/lib/CodeGen/GlobalISel/Utils.cpp:303-304
 
-llvm::MachineInstr *llvm::getDefIgnoringCopies(Register Reg,
-                                               const MachineRegisterInfo &MRI) {
+static std::pair<llvm::MachineInstr *, Register> getDefSrcRegIgnoringCopies(
+    Register Reg,
+    const MachineRegisterInfo &MRI) {
----------------
Instead of a std::pair, can we do something similar to `getConstantVRegValWithLookThrough`, which returns an Optional struct?

Then when we bail out, we can just return None, which is a little nicer IMO.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D74005





More information about the llvm-commits mailing list