[PATCH] D90527: [GlobalISel] ComputeKnownBits - minimum leading/trailing zero bits in shifts (PR44526)

Simon Pilgrim via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sat Oct 31 04:17:55 PDT 2020


RKSimon created this revision.
RKSimon added reviewers: arsenm, regehr, efriedma.
Herald added subscribers: kerbowa, hiraditya, rovka, nhaehnle, jvesely.
Herald added a project: LLVM.
RKSimon requested review of this revision.
Herald added a subscriber: wdng.

PR44526 - as detailed in https://blog.regehr.org/archives/1709 we don't make use of the known leading/trailing bits for shifted values in cases where we don't know the shift amount value.

This patch adds support to GISelKnownBits.computeKnownBitsImpl to use KnownBits::countMinTrailingZeros and countMinLeadingZeros to set the minimum guaranteed leading/trailing known zero/sign bits.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D90527

Files:
  llvm/lib/CodeGen/GlobalISel/GISelKnownBits.cpp
  llvm/test/CodeGen/AMDGPU/GlobalISel/lshr.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D90527.302082.patch
Type: text/x-patch
Size: 8760 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20201031/914a0f9e/attachment.bin>


More information about the llvm-commits mailing list