This is an archive of the discontinued LLVM Phabricator instance.

[ValueTracking] Teach isKnownNonZero that a vscale is never 0.
ClosedPublic

Authored by dmgreen on Jun 20 2022, 11:14 AM.

Details

Summary

A llvm.vscale will always be at least 1, never zero. Teaching that to isKnownNonZero can help fold away some statically known compares.

Diff Detail

Event Timeline

dmgreen created this revision.Jun 20 2022, 11:14 AM
Herald added a project: Restricted Project. · View Herald TranscriptJun 20 2022, 11:14 AM
Herald added a subscriber: hiraditya. · View Herald Transcript
dmgreen requested review of this revision.Jun 20 2022, 11:14 AM
Herald added a project: Restricted Project. · View Herald TranscriptJun 20 2022, 11:14 AM
paulwalker-arm accepted this revision.Jun 20 2022, 11:43 AM
paulwalker-arm added inline comments.
llvm/lib/Analysis/ValueTracking.cpp
2701

The existing coding style suggests this should be

}
// Intrinsic
else if (...
This revision is now accepted and ready to land.Jun 20 2022, 11:43 AM
This revision was landed with ongoing or failed builds.Jun 23 2022, 7:25 AM
This revision was automatically updated to reflect the committed changes.