[PATCH] D135147: [GISel] Handle G_TRUNC in `matchExtractVecEltBuildVec`
Matt Arsenault via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Oct 5 08:46:54 PDT 2022
arsenm added inline comments.
================
Comment at: llvm/lib/CodeGen/GlobalISel/CombinerHelper.cpp:3931-3933
if (!isLegalOrBeforeLegalizer(
{TargetOpcode::G_BUILD_VECTOR, {SrcTy, SrcTy.getElementType()}}))
return false;
----------------
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
================
Comment at: llvm/lib/CodeGen/GlobalISel/CombinerHelper.cpp:3941
+
+ MachineInstr *SrcVecMI = getDefIgnoringCopies(SrcVec, MRI);
+
----------------
getVRegDef should be adequate here
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