llvm-project/llvm/test/Transforms/RewriteStatepointsForGC
Anna Thomas 4b027e8f89 [RS4GC] Drop invalid metadata after pointers are relocated
Summary:
After RS4GC, we should drop metadata that is no longer valid. These metadata
is used by optimizations scheduled after RS4GC, and can cause a miscompile.
One such metadata is invariant.load which is used by LICM sinking transform.
After rewriting statepoints, the address of a load maybe relocated. With
invariant.load metadata on a load instruction, LICM sinking assumes the
loaded value (from a dererenceable address) to be invariant, and
rematerializes the load operand and the load at the exit block.
This transforms the IR to have an unrelocated use of the
address after a statepoint, which is incorrect.
Other metadata we conservatively remove are related to
dereferenceability and noalias metadata.

This patch drops such metadata on store and load instructions after
rewriting statepoints.

Reviewers: reames, sanjoy, apilipenko

Reviewed by: reames

Subscribers: llvm-commits

Differential Revision: https://reviews.llvm.org/D33756

llvm-svn: 305234
2017-06-12 21:26:53 +00:00
..
base-pointers-1.ll
base-pointers-2.ll
base-pointers-3.ll
base-pointers-4.ll
base-pointers-5.ll
base-pointers-6.ll
base-pointers-7.ll
base-pointers-8.ll
base-pointers-9.ll
base-pointers-10.ll
base-pointers-11.ll
base-pointers-12.ll
base-pointers-13.ll
base-pointers.ll
base-vector.ll [RSForGC] Handle vector GEPs 2017-03-17 00:55:53 +00:00
basic.ll
basics.ll
call-gc-result.ll
codegen-cond.ll
constants.ll
deopt-intrinsic-cconv.ll
deopt-intrinsic.ll
deopt-lowering-attrs.ll [RS4GC] Strengthen coverage: add more tests 2016-10-07 20:34:00 +00:00
deref-pointers.ll
drop-invalid-metadata.ll [RS4GC] Drop invalid metadata after pointers are relocated 2017-06-12 21:26:53 +00:00
gc-relocate-creation.ll
invokes.ll
leaf-function.ll
live-vector-nosplit.ll
liveness-basics.ll
patchable-statepoints.ll
preprocess.ll
relocate-invoke-result.ll
relocation.ll
rematerialize-derived-pointers.ll [RS4GC] Remat in presence of phi and use live value 2016-09-22 13:13:06 +00:00
rewrite-invoke.ll
statepoint-attrs.ll [RS4GC] Strengthen coverage: add more tests 2016-10-07 20:34:00 +00:00
statepoint-calling-conventions.ll
statepoint-coreclr.ll
statepoint-format.ll
two-invokes-one-landingpad.ll