llvm-project/llvm/test/Transforms/ArgumentPromotion
Mikael Holmen e0ced14449 [ArgumentPromotion] Change use of removed argument in llvm.dbg.value to undef
Summary:
This solves PR33641.

When removing a dead argument we must also handle possibly existing calls
to llvm.dbg.value that use the removed argument. Now we change the use
of the otherwise dead argument to an undef for some other pass to cleanup
later.

If the calls are left untouched, they will later on cause errors:
 "function-local metadata used in wrong function"
since the ArgumentPromotion rewrites the code by creating a new function
with the wanted signature, but the metadata is not recreated so the new
function may then erroneously use metadata from the old function.

Reviewers: mstorsjo, rnk, arsenm

Reviewed By: rnk

Subscribers: wdng, llvm-commits

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

llvm-svn: 307521
2017-07-10 06:07:24 +00:00
..
2008-02-01-ReturnAttrs.ll
2008-07-02-array-indexing.ll [ArgPromote] Replace all the grep-based testing with precise FileCheck 2017-02-06 08:43:11 +00:00
2008-09-07-CGUpdate.ll
2008-09-08-CGUpdateSelfEdge.ll
aggregate-promote.ll [PM] Port ArgumentPromotion to the new pass manager. 2017-02-09 23:46:27 +00:00
attrs.ll [PM] Port ArgumentPromotion to the new pass manager. 2017-02-09 23:46:27 +00:00
basictest.ll
byval-2.ll [PM] Port ArgumentPromotion to the new pass manager. 2017-02-09 23:46:27 +00:00
byval.ll [PM] Port ArgumentPromotion to the new pass manager. 2017-02-09 23:46:27 +00:00
chained.ll [PM] Port ArgumentPromotion to the new pass manager. 2017-02-09 23:46:27 +00:00
control-flow.ll [PM] Port ArgumentPromotion to the new pass manager. 2017-02-09 23:46:27 +00:00
control-flow2.ll [PM] Port ArgumentPromotion to the new pass manager. 2017-02-09 23:46:27 +00:00
crash.ll [PM] Port ArgumentPromotion to the new pass manager. 2017-02-09 23:46:27 +00:00
dbg.ll Verifier: Disallow a line number without a file in DISubprogram 2017-02-17 23:57:42 +00:00
fp80.ll [PM] Port ArgumentPromotion to the new pass manager. 2017-02-09 23:46:27 +00:00
inalloca.ll [PM] Port ArgumentPromotion to the new pass manager. 2017-02-09 23:46:27 +00:00
pr3085.ll
pr27568.ll [PM] Port ArgumentPromotion to the new pass manager. 2017-02-09 23:46:27 +00:00
pr32917.ll [ArgPromotion] Add a testcase for PR32917 2017-05-05 08:40:24 +00:00
pr33641_remove_arg_dbgvalue.ll [ArgumentPromotion] Change use of removed argument in llvm.dbg.value to undef 2017-07-10 06:07:24 +00:00
profile.ll [ArgPromotion] Don't drop !prof metadata on promoted calls 2017-04-13 18:10:30 +00:00
reserve-tbaa.ll [PM] Port ArgumentPromotion to the new pass manager. 2017-02-09 23:46:27 +00:00
sret.ll [PM] Port ArgumentPromotion to the new pass manager. 2017-02-09 23:46:27 +00:00
tail.ll [PM] Port ArgumentPromotion to the new pass manager. 2017-02-09 23:46:27 +00:00
variadic.ll [PM] Port ArgumentPromotion to the new pass manager. 2017-02-09 23:46:27 +00:00