diff options
Diffstat (limited to 'llvm/lib/Transforms/Utils/Local.cpp')
-rw-r--r-- | llvm/lib/Transforms/Utils/Local.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/llvm/lib/Transforms/Utils/Local.cpp b/llvm/lib/Transforms/Utils/Local.cpp index f5208d5..81d8537 100644 --- a/llvm/lib/Transforms/Utils/Local.cpp +++ b/llvm/lib/Transforms/Utils/Local.cpp @@ -3381,7 +3381,11 @@ static void combineMetadata(Instruction *K, const Instruction *J, K->setMetadata(Kind, MDNode::getMostGenericNoaliasAddrspace(JMD, KMD)); break; - } + case LLVMContext::MD_nosanitize: + // Preserve !nosanitize if both K and J have it. + K->setMetadata(Kind, JMD); + break; + } } // Set !invariant.group from J if J has it. If both instructions have it // then we will just pick it from J - even when they are different. |