[PATCH] D111163: [UnknownProvenance] add support in ValueMapper

Jeroen Dobbelaere via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Apr 15 06:58:37 PDT 2022


jeroen.dobbelaere updated this revision to Diff 423093.
jeroen.dobbelaere added a comment.
Herald added a project: All.

Rebase to 49cb4fef02e635bf304906232214166c7531d753 <https://reviews.llvm.org/rG49cb4fef02e635bf304906232214166c7531d753>


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D111163/new/

https://reviews.llvm.org/D111163

Files:
  llvm/lib/Transforms/Utils/ValueMapper.cpp


Index: llvm/lib/Transforms/Utils/ValueMapper.cpp
===================================================================
--- llvm/lib/Transforms/Utils/ValueMapper.cpp
+++ llvm/lib/Transforms/Utils/ValueMapper.cpp
@@ -528,6 +528,8 @@
     return getVM()[V] = UndefValue::get(NewTy);
   if (isa<ConstantAggregateZero>(C))
     return getVM()[V] = ConstantAggregateZero::get(NewTy);
+  if (isa<UnknownProvenance>(C))
+    return getVM()[V] = UnknownProvenance::get(cast<PointerType>(NewTy));
   assert(isa<ConstantPointerNull>(C));
   return getVM()[V] = ConstantPointerNull::get(cast<PointerType>(NewTy));
 }


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D111163.423093.patch
Type: text/x-patch
Size: 603 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220415/158db923/attachment.bin>


More information about the llvm-commits mailing list