[PATCH] D77210: [GlobalISel] Combine sext([sz]ext) -> [sz]ext, zext(zext) -> zext
Matt Arsenault via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Apr 1 09:01:06 PDT 2020
arsenm added inline comments.
================
Comment at: llvm/include/llvm/CodeGen/GlobalISel/LegalizationArtifactCombiner.h:128
+ LLVM_DEBUG(dbgs() << ".. Combine MI: " << MI);
+ Builder.buildZExt(DstReg, ZextSrc);
+ markInstAndDefDead(MI, *MRI.getVRegDef(SrcReg), DeadInsts);
----------------
Can you just replace the source?
================
Comment at: llvm/include/llvm/CodeGen/GlobalISel/LegalizationArtifactCombiner.h:180
+ if (mi_match(SrcReg, MRI,
+ m_all_of(m_MInstr(ExtMI), m_any_of(m_GZExt(m_Reg(ExtSrc)),
+ m_GSExt(m_Reg(ExtSrc)))))) {
----------------
Why the m_all_of?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D77210/new/
https://reviews.llvm.org/D77210
More information about the llvm-commits
mailing list