[llvm] [AArch64] Fold COPY(y:gpr, DUP(x:fpr, i)) -> UMOV(y:gpr, x:fpr, i) (PR #89017)

David Green via llvm-commits llvm-commits at lists.llvm.org
Tue May 14 04:14:42 PDT 2024


================
@@ -107,6 +108,8 @@ bool AArch64PostSelectOptimize::doPeepholeOpts(MachineBasicBlock &MBB) {
   for (auto &MI : make_early_inc_range(make_range(MBB.begin(), MBB.end()))) {
     Changed |= foldSimpleCrossClassCopies(MI);
   }
+  for (auto &MI : make_early_inc_range(make_range(MBB.begin(), MBB.end())))
----------------
davemgreen wrote:

Can these be part of the same loop, to save it iterating every instruction twice?

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


More information about the llvm-commits mailing list