This is an archive of the discontinued LLVM Phabricator instance.

[SCCP] Skip computing intrinsics if one of its args is unknownOrUndef
ClosedPublic

Authored by StephenFan on Jun 8 2023, 11:29 PM.

Details

Summary

For constant range supported intrinsics, we got consantrange from args
no matter if they are unknown or undef. And the constant range computed
from unknown or undef value state is full range.

I think compute with full constant range is harmful since although we
can do mergeIn after these args value state are changed, the merge
operation of two constant ranges is union.

Diff Detail

Event Timeline

StephenFan created this revision.Jun 8 2023, 11:29 PM
Herald added a project: Restricted Project. · View Herald TranscriptJun 8 2023, 11:29 PM
StephenFan requested review of this revision.Jun 8 2023, 11:29 PM
Herald added a project: Restricted Project. · View Herald TranscriptJun 8 2023, 11:29 PM
nikic accepted this revision.Jun 8 2023, 11:54 PM

LGTM

llvm/test/Transforms/SCCP/intrinsics.ll
102

Please precommit the test.

This revision is now accepted and ready to land.Jun 8 2023, 11:54 PM

Precommit test and rebase.

This revision was landed with ongoing or failed builds.Jun 10 2023, 12:56 AM
This revision was automatically updated to reflect the committed changes.