[PATCH] D111839: [AArch64][GlobalISel] combine and + [la]sr => ubfx

Jay Foad via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Oct 18 00:38:30 PDT 2021


foad accepted this revision.
foad added a comment.
This revision is now accepted and ready to land.

LGTM modulo nits, thanks.



================
Comment at: llvm/lib/CodeGen/GlobalISel/CombinerHelper.cpp:4138
+  // Check if the type we would use for the extract is legal.
+  LLT ExtractTy = getTargetLowering().getPreferredShiftAmountTy(Ty);
+  if (!LI || !LI->isLegalOrCustom({ExtrOpcode, {Ty, ExtractTy}}))
----------------
No need for this variable.


================
Comment at: llvm/lib/CodeGen/GlobalISel/CombinerHelper.cpp:4157
+
+  // Check that [su]bfx can do the extraction, with no holes in the mask.
+  uint64_t UMask = SMask;
----------------
Just "ubfx".


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D111839



More information about the llvm-commits mailing list