[PATCH] D135148: [GISel] Handle hi element extract in `matchTruncBuildVectorFold`
Jessica Paquette via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Oct 4 10:24:35 PDT 2022
paquette added inline comments.
================
Comment at: llvm/lib/CodeGen/GlobalISel/CombinerHelper.cpp:5929-5940
+ // Replace (G_TRUNC (G_LSHR (G_BITCAST (G_BUILD_VECTOR x, y)), K)) with
+ // y if K == size of vector element type
+ Optional<ValueAndVReg> ShiftAmt;
+ if (mi_match(Src, MRI,
+ m_GLShr(m_GBitcast(m_GBuildVector(m_Reg(), m_Reg(MatchInfo))),
+ m_GCst(ShiftAmt)))) {
+ LLT MatchTy = MRI.getType(MatchInfo);
----------------
arsenm wrote:
> This doesn't really have anything in common with the other fold here. Should it move to a separate match function?
+1
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D135148/new/
https://reviews.llvm.org/D135148
More information about the llvm-commits
mailing list