[PATCH] D156832: [GlobalISel] Handle trunc(sext x) in artifact combiner
Jon Roelofs via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Aug 1 15:49:43 PDT 2023
jroelofs added inline comments.
================
Comment at: llvm/include/llvm/CodeGen/GlobalISel/LegalizationArtifactCombiner.h:330
+ Register SextSrc;
+ if (mi_match(SrcReg, MRI, m_GSExt(m_Reg(SextSrc)))) {
+ LLT DstTy = MRI.getType(DstReg);
----------------
ISTM this should do `m_GAnyExt` so we also get coverage for `trunc(zext x) -> x`.
================
Comment at: llvm/include/llvm/CodeGen/GlobalISel/LegalizationArtifactCombiner.h:334
+ if (DstTy == SextSrcTy) {
+ LLVM_DEBUG(dbgs() << ".. Combine MI: " << MI;);
+
----------------
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D156832/new/
https://reviews.llvm.org/D156832
More information about the llvm-commits
mailing list