[llvm] 838ecf2 - [dfsan] Test loading global ptrs

Jianzhou Zhao via llvm-commits llvm-commits at lists.llvm.org
Wed Dec 2 13:36:03 PST 2020


Author: Jianzhou Zhao
Date: 2020-12-02T21:35:41Z
New Revision: 838ecf2ea483ce6986a1d38208555155bbc53bba

URL: https://github.com/llvm/llvm-project/commit/838ecf2ea483ce6986a1d38208555155bbc53bba
DIFF: https://github.com/llvm/llvm-project/commit/838ecf2ea483ce6986a1d38208555155bbc53bba.diff

LOG: [dfsan] Test loading global ptrs

This covers a branch in the loadShadow method.

Reviewed-by: morehouse

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

Added: 
    

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

Removed: 
    


################################################################################
diff  --git a/llvm/test/Instrumentation/DataFlowSanitizer/load.ll b/llvm/test/Instrumentation/DataFlowSanitizer/load.ll
index 5bb3984227df..9cdf69d11ddb 100644
--- a/llvm/test/Instrumentation/DataFlowSanitizer/load.ll
+++ b/llvm/test/Instrumentation/DataFlowSanitizer/load.ll
@@ -166,3 +166,12 @@ define i64 @load64(i64* %p) {
   %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


        


More information about the llvm-commits mailing list