This is an archive of the discontinued LLVM Phabricator instance.

[ValueTracking] Dereferenced pointers are noundef
ClosedPublic

Authored by aqjune on Feb 13 2021, 12:56 AM.

Details

Summary

This is a follow-up of D95238's LangRef update.
This patch updates programUndefinedIfUndefOrPoison(V) to return true if
V is used by any memory-accessing instruction.
Interestingly, this affected many tests in Attributors, mainly about adding noundefs.
The tests are updated using llvm/utils/update_test_checks.py. I checked that the diffs
are about updating noundefs.

Diff Detail

Event Timeline

aqjune created this revision.Feb 13 2021, 12:56 AM
aqjune requested review of this revision.Feb 13 2021, 12:56 AM
Herald added a reviewer: baziotis. · View Herald Transcript
Herald added a project: Restricted Project. · View Herald Transcript
nikic accepted this revision.Feb 13 2021, 1:57 AM

LGTM

llvm/include/llvm/Analysis/ValueTracking.h
594

, i.e. has undef bits or is poison.

llvm/lib/Analysis/ValueTracking.cpp
5174

Add a comment that these may be *partially* undef and thus not well-defined?

This revision is now accepted and ready to land.Feb 13 2021, 1:57 AM
aqjune updated this revision to Diff 323612.Feb 14 2021, 5:55 AM

Address comments

This revision was landed with ongoing or failed builds.Feb 14 2021, 5:56 AM
This revision was automatically updated to reflect the committed changes.
aqjune marked 2 inline comments as done.Feb 14 2021, 5:57 AM