[PATCH] D108306: [GlobalISel] Avoid creating COPY in LegalizationArtifactCombiner
Jay Foad via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Aug 23 08:44:21 PDT 2021
foad accepted this revision.
foad added a comment.
This revision is now accepted and ready to land.
LGTM!
================
Comment at: llvm/include/llvm/CodeGen/GlobalISel/LegalizationArtifactCombiner.h:135
+ SextSrc = Builder.buildSExtOrTrunc(DstTy, SextSrc).getReg(0);
+ if (TruncSrc && (DstTy != MRI.getType(TruncSrc)))
+ TruncSrc = Builder.buildAnyExtOrTrunc(DstTy, TruncSrc).getReg(0);
----------------
aemerson wrote:
> should this be `else if`?
I don't think it needs to be since SextSrc and TruncSrc are mutually exclusive.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D108306/new/
https://reviews.llvm.org/D108306
More information about the llvm-commits
mailing list