[ValueTracking] Dereferenced pointers are noundef
authoraqjune <aqjune@gmail.com>
Sat, 13 Feb 2021 07:22:25 +0000 (16:22 +0900)
committeraqjune <aqjune@gmail.com>
Sun, 14 Feb 2021 13:50:48 +0000 (22:50 +0900)
commit5f3c99085d4c2ebf57fd0586b013b02e32a8e20b
treecb18e98d5efa842731a9c3dc6ec7e012dd5724ef
parent39ff002e526e1df3e4bebbfdd2beebf0440d7d92
[ValueTracking] Dereferenced pointers are noundef

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.

Reviewed By: nikic

Differential Revision: https://reviews.llvm.org/D96642
36 files changed:
llvm/include/llvm/Analysis/ValueTracking.h
llvm/lib/Analysis/ValueTracking.cpp
llvm/test/Transforms/Attributor/ArgumentPromotion/2008-07-02-array-indexing.ll
llvm/test/Transforms/Attributor/ArgumentPromotion/X86/attributes.ll
llvm/test/Transforms/Attributor/ArgumentPromotion/X86/min-legal-vector-width.ll
llvm/test/Transforms/Attributor/ArgumentPromotion/attrs.ll
llvm/test/Transforms/Attributor/ArgumentPromotion/byval-2.ll
llvm/test/Transforms/Attributor/ArgumentPromotion/dbg.ll
llvm/test/Transforms/Attributor/ArgumentPromotion/tail.ll
llvm/test/Transforms/Attributor/align.ll
llvm/test/Transforms/Attributor/callbacks.ll
llvm/test/Transforms/Attributor/chain.ll
llvm/test/Transforms/Attributor/depgraph.ll
llvm/test/Transforms/Attributor/dereferenceable-1.ll
llvm/test/Transforms/Attributor/dereferenceable-2-inseltpoison.ll
llvm/test/Transforms/Attributor/dereferenceable-2.ll
llvm/test/Transforms/Attributor/heap_to_stack.ll
llvm/test/Transforms/Attributor/internal-noalias.ll
llvm/test/Transforms/Attributor/liveness.ll
llvm/test/Transforms/Attributor/memory_locations.ll
llvm/test/Transforms/Attributor/misc.ll
llvm/test/Transforms/Attributor/misc_crash.ll
llvm/test/Transforms/Attributor/noalias.ll
llvm/test/Transforms/Attributor/nocapture-1.ll
llvm/test/Transforms/Attributor/nocapture-2.ll
llvm/test/Transforms/Attributor/nofree.ll
llvm/test/Transforms/Attributor/nonnull.ll
llvm/test/Transforms/Attributor/norecurse.ll
llvm/test/Transforms/Attributor/nosync.ll
llvm/test/Transforms/Attributor/range.ll
llvm/test/Transforms/Attributor/read_write_returned_arguments_scc.ll
llvm/test/Transforms/Attributor/readattrs.ll
llvm/test/Transforms/Attributor/undefined_behavior.ll
llvm/test/Transforms/Attributor/value-simplify.ll
llvm/test/Transforms/InstSimplify/freeze.ll
llvm/test/Transforms/OpenMP/parallel_deletion.ll