[PATCH] D135147: [GISel] Handle G_TRUNC in `matchExtractVecEltBuildVec`

Pierre van Houtryve via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Oct 6 00:03:05 PDT 2022


Pierre-vh added inline comments.


================
Comment at: llvm/lib/CodeGen/GlobalISel/CombinerHelper.cpp:3931-3933
   if (!isLegalOrBeforeLegalizer(
           {TargetOpcode::G_BUILD_VECTOR, {SrcTy, SrcTy.getElementType()}}))
     return false;
----------------
arsenm wrote:
> I don't see why this legality check (or the one below for build_vector_trunc) are here. The equivalent DAG combine does not check for the legality, and you're not creating a new one in the apply
@aemerson I see you implemented this one, is it okay to remove the legalizer checks?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D135147



More information about the llvm-commits mailing list