diff options
author | Nikita Popov <npopov@redhat.com> | 2023-01-19 16:55:23 +0100 |
---|---|---|
committer | Nikita Popov <npopov@redhat.com> | 2023-01-19 16:56:09 +0100 |
commit | b3b049a824a09749e106ee477718a6145fe4c23f (patch) | |
tree | 643c46e096341c7fd17fd44c707fa01fc76a79f1 /llvm/lib/Transforms/Utils/Local.cpp | |
parent | f13d6001324e9c9653d8568c1d86e182b217e272 (diff) | |
download | llvm-b3b049a824a09749e106ee477718a6145fe4c23f.zip llvm-b3b049a824a09749e106ee477718a6145fe4c23f.tar.gz llvm-b3b049a824a09749e106ee477718a6145fe4c23f.tar.bz2 |
[Local] Preserve noundef metadata in copyMetadataForLoad()
If we're only changing the type of the load, preserve the noundef
metadata.
Diffstat (limited to 'llvm/lib/Transforms/Utils/Local.cpp')
-rw-r--r-- | llvm/lib/Transforms/Utils/Local.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/llvm/lib/Transforms/Utils/Local.cpp b/llvm/lib/Transforms/Utils/Local.cpp index 00cbee9a..a57035d 100644 --- a/llvm/lib/Transforms/Utils/Local.cpp +++ b/llvm/lib/Transforms/Utils/Local.cpp @@ -2752,6 +2752,7 @@ void llvm::copyMetadataForLoad(LoadInst &Dest, const LoadInst &Source) { case LLVMContext::MD_nontemporal: case LLVMContext::MD_mem_parallel_loop_access: case LLVMContext::MD_access_group: + case LLVMContext::MD_noundef: // All of these directly apply. Dest.setMetadata(ID, N); break; |