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 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits