[PATCH] D109949: [x86][AMX] Support undef and zeroinitializer for x86_amx
Xiang Zhang via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Sep 17 05:06:09 PDT 2021
xiangzhangllvm added inline comments.
================
Comment at: llvm/lib/IR/Verifier.cpp:4603-4606
if (auto *Const = dyn_cast<Constant>(V))
- Assert(!Const->getType()->isX86_AMXTy(),
+ Assert(!(Const->getType()->isX86_AMXTy() && !Const->isNullValue() &&
+ !isa<UndefValue>(V)),
"const x86_amx is not allowed in argument!");
----------------
I think we can remove this code, it is strange here.
================
Comment at: llvm/lib/Target/X86/X86LowerAMXType.cpp:308
Instruction &Inst = *II++;
+ // handle with amx_type of undef and zeroinitializer
+ if (auto *Intr = dyn_cast<IntrinsicInst>(&Inst)) {
----------------
This way is finding which operand is amx null/undef, then create a tilezero to replace the operand.
here may be create a lot of tilezeros.
I think here must be a better way to do it.
e.g. From the value side, replace all of uses of it.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D109949/new/
https://reviews.llvm.org/D109949
More information about the llvm-commits
mailing list