This is an archive of the discontinued LLVM Phabricator instance.

[GlobalISel] Implement computeKnownBits for G_ASSERT_ZEXT
ClosedPublic

Authored by paquette on Jan 27 2021, 2:39 PM.

Details

Summary

It's the same as the ZEXT/TRUNC case, except SrcBitWidth is given by the immediate operand.

Update KnownBitsTest.cpp and a MIR test for a concrete example.

Diff Detail

Event Timeline

paquette created this revision.Jan 27 2021, 2:39 PM
paquette requested review of this revision.Jan 27 2021, 2:39 PM
Herald added a project: Restricted Project. · View Herald TranscriptJan 27 2021, 2:39 PM
Herald added a subscriber: wdng. · View Herald Transcript
arsenm added inline comments.Jan 27 2021, 4:32 PM
llvm/lib/CodeGen/GlobalISel/GISelKnownBits.cpp
416

This should get braces

llvm/unittests/CodeGen/GlobalISel/KnownBitsTest.cpp
924

I think testing the boundary conditions 1, 63 are more useful than a bunch of powers of 2

paquette updated this revision to Diff 319720.Jan 27 2021, 4:55 PM
  • Add missing braces
  • Test boundary values
aemerson accepted this revision.Jan 28 2021, 2:27 PM

LGTM.

This revision is now accepted and ready to land.Jan 28 2021, 2:27 PM