[PATCH] D88396: [X86] Replace aligned vector move with unaligned move when avx is enabled.

Craig Topper via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Oct 9 20:41:11 PDT 2020


craig.topper added inline comments.


================
Comment at: llvm/lib/Target/X86/X86UnalignedVectorMoves.cpp:93
+    for (MachineInstr &MI : MBB)
+      Changed |= (MovapsToMovupsImpl(MI) || MovapdToMovupdImpl(MI) ||
+                  MovdqaToMovdquImpl(MI));
----------------
LuoYuanke wrote:
> craig.topper wrote:
> > Why do we need 3 separate functions?
> Separating into 3 function looks clearer to me. I can merge them into 1 switch clause and add 3 comments for the code. Do you prefer merge?
I'd prefer one function. And if you can get all 3 lines on one line without exceeding 80 columns I'd prefer that

case X86::VMOVDQA32Z128mr: NewOpc = X86::VMOVDQU32Z128mr; break;

The start of NewOpc on every line. Same for the break. See for example the nested switch in X86InstrInfo::optimizeCompareInstr


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D88396



More information about the llvm-commits mailing list