[PATCH] D107544: [X86] [AMX] Replace bitcast with specific AMX intrinsics with X86 specific cast.
LuoYuanke via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Aug 16 07:50:49 PDT 2021
LuoYuanke added inline comments.
================
Comment at: llvm/lib/Target/X86/X86LowerAMXType.cpp:803
+ return false;
+ }
+ }
----------------
Drop brace.
================
Comment at: llvm/lib/Target/X86/X86LowerAMXType.cpp:823
+ // There should not be a AMXcast from a const.
+ if (ACI && isAMXCast(ACI)) {
+ NewV = ACI->getOperand(0);
----------------
Drop brace.
================
Comment at: llvm/lib/Target/X86/X86LowerAMXType.cpp:825
+ NewV = ACI->getOperand(0);
+ } else if (auto *PrevPN = dyn_cast<PHINode>(V)) {
+ NewV = NewPNodes[PrevPN];
----------------
Drop brace.
================
Comment at: llvm/lib/Target/X86/X86LowerAMXType.cpp:840
+ // Replace users of BitCast B->A with NewPHI. These will help
+ // later to get rid off a closure formed by OldPHI nodes.
+ for (auto *OldPN : OldPhiNodes) {
----------------
of
================
Comment at: llvm/lib/Target/X86/X86LowerAMXType.cpp:844
+ for (User *V : make_early_inc_range(OldPN->users())) {
+ Instruction *ACI = dyn_cast<Instruction>(V);
+ if (ACI && isAMXCast(ACI)) {
----------------
What does ACI stand for? AMX cast intrinsic?
================
Comment at: llvm/lib/Target/X86/X86LowerAMXType.cpp:860
+ llvm_unreachable("all uses should be handled");
+ }
+ }
----------------
Drop brace.
================
Comment at: llvm/lib/Target/X86/X86LowerAMXType.cpp:920
+ for (Instruction &I : BB) {
+ if (isAMXCast(&I)) {
+ if (PHINode *PN = dyn_cast<PHINode>(I.getOperand(0)))
----------------
We can erase dead cast code from Vec2TileInsts and Vec2TileInsts and get AMX cast instruction from there, so that we can avoid iterate basic block again.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D107544/new/
https://reviews.llvm.org/D107544
More information about the llvm-commits
mailing list