[PATCH] D76601: [GlobalISel] combine trunc(trunc) pattern

Matt Arsenault via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Mar 23 10:24:03 PDT 2020


arsenm added inline comments.


================
Comment at: llvm/include/llvm/CodeGen/GlobalISel/LegalizationArtifactCombiner.h:258-259
+      const LLT TruncSrcTy = MRI.getType(TruncSrc);
+      if (!isInstLegal({TargetOpcode::G_TRUNC, {DstTy, TruncSrcTy}}))
+        return false;
+
----------------
Scalar truncate always needs to be legal?


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D76601/new/

https://reviews.llvm.org/D76601





More information about the llvm-commits mailing list