[PATCH] D127154: [AArch64] Remove isDef32

Eli Friedman via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Jun 6 14:47:13 PDT 2022


efriedma added inline comments.


================
Comment at: llvm/lib/Target/AArch64/AArch64ISelDAGToDAG.cpp:869
 
     // Don't match if free 32-bit -> 64-bit zext can be used instead.
+    auto isDef32 = [](SDValue N) {
----------------
Maybe explicitly note this is a heuristic, so it doesn't matter if it's wrong in edge cases.


================
Comment at: llvm/lib/Target/AArch64/AArch64MIPeepholeOpt.cpp:209
+static bool isFreeZExtOfGPR32(MachineInstr *MI, MachineRegisterInfo *MRI) {
+  // A COPY from and FPR will become a FMOVSWr.
+  if (MI->getOpcode() == TargetOpcode::COPY &&
----------------
It's not clear to me we'll always end up with an FMOVSWr, given copy coalescing.

You could explicitly select an FMOVSWr here, but I guess that has other consequences for register allocation...


================
Comment at: llvm/lib/Target/AArch64/AArch64MIPeepholeOpt.cpp:218
+  }
+  return MI->getOpcode() > TargetOpcode::GENERIC_OP_END;
+}
----------------
Should we check for pseudo-instructions here?  Are there any pseudo-instructions which might produce a register with undefined high bits?


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

https://reviews.llvm.org/D127154



More information about the llvm-commits mailing list