[PATCH] D143787: [X86] Add new pass `X86FixupInstTuning` for fixing up machine-instruction selection.

Simon Pilgrim via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Feb 23 18:08:12 PST 2023


RKSimon accepted this revision.
RKSimon added a comment.
This revision is now accepted and ready to land.

LGTM with a few minors - thank you for working on this!



================
Comment at: llvm/lib/Target/X86/X86FixupInstTuning.cpp:19
+//
+//      `vpermq xmm` -> `vshufd xmm`
+//          -- GOOD, always replaceable
----------------
VPERMILPS xmm? 


================
Comment at: llvm/lib/Target/X86/X86FixupInstTuning.cpp:94
+  auto ProcessVPERMILPSmi = [&](unsigned NewOpc) -> bool {
+    if (!ST->hasNoDomainDelayShuffle())
+      return false;
----------------
Maybe add a TODO for always changing for Os/Oz builds?


================
Comment at: llvm/lib/Target/X86/X86FixupInstTuning.cpp:100
+
+  switch (Opc) {
+  case X86::VPERMILPSri:
----------------
Are you intending to support the predicated variants as well? Maybe add a TODO?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D143787



More information about the llvm-commits mailing list