This is an archive of the discontinued LLVM Phabricator instance.

[InstCombine] Add !noundef to match behavior of violating assume
ClosedPublic

Authored by StephenFan on Jun 20 2023, 11:02 PM.

Details

Summary

The behaviors of violating assume instruction or !nonnull metadata is
different. The former is immediate undefined behavior, but the latter is
returning poison value. This patch adds !noundef to trigger immediate
undefined behavior if !nonnull is violated.

Diff Detail

Event Timeline

StephenFan created this revision.Jun 20 2023, 11:02 PM
Herald added a project: Restricted Project. · View Herald TranscriptJun 20 2023, 11:02 PM
Herald added a subscriber: hiraditya. · View Herald Transcript
StephenFan requested review of this revision.Jun 20 2023, 11:02 PM
Herald added a project: Restricted Project. · View Herald TranscriptJun 20 2023, 11:02 PM
nikic accepted this revision.Jun 21 2023, 12:28 AM

LGTM

This revision is now accepted and ready to land.Jun 21 2023, 12:28 AM