This is an archive of the discontinued LLVM Phabricator instance.

[ValueTracking] Add ComputeNumSignBits support for llvm.abs intrinsic
ClosedPublic

Authored by craig.topper on Jul 30 2020, 12:30 PM.

Details

Summary

If absolute value needs turn a negative number into a positive number it reduces the number of sign bits by at most 1.

Diff Detail

Event Timeline

craig.topper created this revision.Jul 30 2020, 12:30 PM
Herald added a project: Restricted Project. · View Herald TranscriptJul 30 2020, 12:30 PM
craig.topper requested review of this revision.Jul 30 2020, 12:30 PM
craig.topper retitled this revision from [ValueTracking] to [ValueTracking] Add ComputeNumSignBits support for llvm.abs intrinsic.
craig.topper edited the summary of this revision. (Show Details)
spatel accepted this revision.Jul 31 2020, 8:08 AM

LGTM

llvm/lib/Analysis/ValueTracking.cpp
3005

Could use 'auto *' here per coding standards.

This revision is now accepted and ready to land.Jul 31 2020, 8:08 AM