[PATCH] D92460: [dfsan] Test loading global ptrs

stephan.yichao.zhao via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Dec 1 22:05:09 PST 2020


stephan.yichao.zhao created this revision.
stephan.yichao.zhao added a reviewer: morehouse.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.
stephan.yichao.zhao requested review of this revision.

This covers a branch in the loadShadow method.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D92460

Files:
  llvm/test/Instrumentation/DataFlowSanitizer/load.ll


Index: llvm/test/Instrumentation/DataFlowSanitizer/load.ll
===================================================================
--- llvm/test/Instrumentation/DataFlowSanitizer/load.ll
+++ llvm/test/Instrumentation/DataFlowSanitizer/load.ll
@@ -166,3 +166,12 @@
   %a = load i64, i64* %p
   ret i64 %a
 }
+
+ at X = constant i1 1
+define i1 @load_global() {
+  ; NO_COMBINE_PTR_LABEL: @"dfs$load_global"
+  ; NO_COMBINE_PTR_LABEL: store i16 0, i16* @__dfsan_retval_tls, align 2
+
+  %a = load i1, i1* @X
+  ret i1 %a
+}
\ No newline at end of file


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D92460.308873.patch
Type: text/x-patch
Size: 543 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20201202/5a09297f/attachment.bin>


More information about the llvm-commits mailing list