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

Noah Goldstein via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Feb 24 23:39:46 PST 2023


goldstein.w.n marked 2 inline comments as done.
goldstein.w.n added inline comments.


================
Comment at: llvm/lib/Target/X86/X86FixupInstTuning.cpp:115
+  case X86::VPERMILPSYmi:
+    return ProcessVPERMILPSmi(X86::VPSHUFDmi);
+  case X86::VPERMILPSmi:
----------------
goldstein.w.n wrote:
> RKSimon wrote:
> > VPSHUFDYmi? I think this needs a AVX2 check as well
> Good catch. Do you know the API for checking if an instruction is supported on the target? Or will it need to be manually done case by case?
> VPSHUFDYmi? I think this needs a AVX2 check as well

Done, did just a manual check here, but if you know an API for querying if an opcode is supported that would probably be better going forward.
Added tests for the `permilps` transforms here: D144779 and the AVX2 requirement is tested.


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