[PATCH] D107330: [GlobalISel] Combine shr(shl x, c1), c2 to G_SBFX/G_UBFX
Jay Foad via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Aug 5 01:01:37 PDT 2021
foad added a comment.
LGTM apart from the question inline.
================
Comment at: llvm/lib/CodeGen/GlobalISel/CombinerHelper.cpp:4145
+ LLT ExtractTy = getTargetLowering().getPreferredShiftAmountTy(Ty);
+ if (!LI || !LI->isLegalOrCustom({ExtrOpcode, {Ty, ExtractTy}}))
+ return false;
----------------
Lots of combines use `isLegalOrBeforeLegalizer`, i.e. they do apply before legalization. Is there a reason you have made this one different, so it does not apply before legalization?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D107330/new/
https://reviews.llvm.org/D107330
More information about the llvm-commits
mailing list