[PATCH] D122714: [X86][AMX] Materialize undef or zero value to tilezero

Xiang Zhang via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Mar 30 18:44:10 PDT 2022


xiangzhangllvm added inline comments.


================
Comment at: llvm/lib/Target/X86/X86LowerAMXType.cpp:81
+    return false;
+  switch (II->getIntrinsicID()) {
+  default:
----------------
Can we implement this with "Reverse thinking".
for example:
use x86_amx tile and exclude non-amx-instrinsics instruction (cast, copy, ..).
In this way we may no need to care about here when we add new AMXs.


================
Comment at: llvm/lib/Target/X86/X86LowerAMXType.cpp:186
+static std::pair<Value *, Value *> getShape(PHINode *Phi) {
+  Use &U = *(Phi->use_begin());
+  unsigned OpNo = U.getOperandNo();
----------------
a1: Here only fetch the first use. 
a2: line 191 if its user "V->use_empty()" will fail ?
a3: how about a1 second use can get shape but 1st not.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D122714



More information about the llvm-commits mailing list