This is an archive of the discontinued LLVM Phabricator instance.

[SelectionDAG] Use various APInt methods to reduce temporary APInt creation
ClosedPublic

Authored by craig.topper on Apr 26 2017, 1:00 PM.

Details

Summary

This patch uses various APInt methods to reduce the number of temporary APInts. These were all found while working through converting SelectionDAG's computeKnownBits to also use the KnownBits struct recently added to the ValueTracking version.

Diff Detail

Event Timeline

craig.topper created this revision.Apr 26 2017, 1:00 PM
craig.topper added inline comments.
lib/CodeGen/SelectionDAG/TargetLowering.cpp
655

Just a note on this. If you go through the boolean algebra you'll figure out that the lines that were deleted here are equivalent to the earlier two lines.

RKSimon accepted this revision.Apr 27 2017, 4:05 AM

LGTM

This revision is now accepted and ready to land.Apr 27 2017, 4:05 AM
craig.topper closed this revision.Apr 27 2017, 10:17 PM