This is an archive of the discontinued LLVM Phabricator instance.

[GlobalISel] ComputeKnownBits - use common KnownBits shift handling (PR44526)
ClosedPublic

Authored by RKSimon on Oct 31 2020, 4:17 AM.

Details

Summary

Convert GISelKnownBits.computeKnownBitsImpl shift handling to use the common KnownBits implementations, which makes use the of the known leading/trailing bits for shifted values in cases where we don't know the shift amount value as detailed in https://blog.regehr.org/archives/1709 .

Diff Detail

Event Timeline

RKSimon created this revision.Oct 31 2020, 4:17 AM
Herald added a project: Restricted Project. · View Herald TranscriptOct 31 2020, 4:17 AM
RKSimon requested review of this revision.Oct 31 2020, 4:17 AM
foad added a subscriber: foad.Oct 31 2020, 5:20 AM
arsenm added inline comments.Nov 2 2020, 9:35 AM
llvm/lib/CodeGen/GlobalISel/GISelKnownBits.cpp
385–388

I thought there was a move towards moving the shared implementation of these into KnownBits::. Is there a reason this needs to be repeated here?

392

s/signbits/sign bits/

RKSimon planned changes to this revision.Nov 2 2020, 10:17 AM
RKSimon added inline comments.
llvm/lib/CodeGen/GlobalISel/GISelKnownBits.cpp
385–388

No reason - I'll refactor the SelectionDAG version to do that and then update this to use it as well.

RKSimon updated this revision to Diff 302770.Nov 4 2020, 1:12 AM
RKSimon edited the summary of this revision. (Show Details)

Updated to use the common KnownBits implementations.

RKSimon retitled this revision from [GlobalISel] ComputeKnownBits - minimum leading/trailing zero bits in shifts (PR44526) to [GlobalISel] ComputeKnownBits - use common KnownBits shift handling (PR44526).Nov 4 2020, 8:02 AM
arsenm accepted this revision.Nov 4 2020, 8:53 AM
This revision is now accepted and ready to land.Nov 4 2020, 8:53 AM
This revision was landed with ongoing or failed builds.Nov 5 2020, 3:53 AM
This revision was automatically updated to reflect the committed changes.