[PATCH] D91927: [X86] Add x86_amx type for intel AMX.

Pengfei Wang via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Dec 22 06:57:07 PST 2020


pengfei added inline comments.


================
Comment at: llvm/lib/Target/X86/X86LowerAMXType.cpp:264
+  SmallVector<Instruction *, 8> DeadInsts;
+  SmallVector<Instruction *, 2> DeadBitcasts;
+
----------------
Maybe better to use BitCastInst?


================
Comment at: llvm/lib/Target/X86/X86LowerAMXType.cpp:274
+      if (Bitcast->user_empty()) {
+        DeadInsts.push_back(Bitcast);
         continue;
----------------
Why don't put it in DeadBitcasts?


================
Comment at: llvm/lib/Target/X86/X86LowerAMXType.cpp:280
+      Type *Ty = Bitcast->getType();
+      auto CanonicalizeBitcast = [&]() {
+        bool Change = false;
----------------
Can we leave the canonicalize bitcast cases a single patch. It's a bit complex here and I don't think it's a common case.


================
Comment at: llvm/lib/Target/X86/X86LowerAMXType.cpp:420
   }
+  // Delete user first.
+  for (auto *Inst : DeadBitcasts)
----------------
This comment is for above code? Better move it up.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D91927



More information about the llvm-commits mailing list