[PATCH] D85965: [GlobalISel] Add a combine for ashr(shl x, c), c --> sext_inreg x, c'
Matt Arsenault via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Aug 14 06:51:57 PDT 2020
arsenm added a comment.
Seems like it's missing a legality check, although I'm unclear on what the overall strategy for those is supposed to be
================
Comment at: llvm/lib/CodeGen/GlobalISel/CombinerHelper.cpp:1895
+ Register Src;
+ if (!mi_match(MI.getOperand(0).getReg(), MRI,
+ m_GAShr(m_GShl(m_Reg(Src), m_ICst(ShlCst)), m_ICst(AshrCst))))
----------------
Add a fixme for splat vectors?
================
Comment at: llvm/test/CodeGen/AArch64/GlobalISel/prelegalizercombiner-ashr-shl-to-sext-inreg.mir:62
+
+...
----------------
Could use some vector tests. I don't think m_ICst is smart enough to match splat vectors though. Adding the tests won't hurt for when that's solved.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D85965/new/
https://reviews.llvm.org/D85965
More information about the llvm-commits
mailing list