[dfsan] Add a test case of storing zero
authorJianzhou Zhao <jianzhouzh@google.com>
Fri, 4 Dec 2020 05:39:37 +0000 (05:39 +0000)
committerJianzhou Zhao <jianzhouzh@google.com>
Fri, 4 Dec 2020 20:28:44 +0000 (20:28 +0000)
This covers a branch in storeShadow.

Reviewed-by: morehouse
Differential Revision: https://reviews.llvm.org/D92632

llvm/test/Instrumentation/DataFlowSanitizer/store.ll

index a66cedf..4560c3d 100644 (file)
@@ -158,3 +158,9 @@ define void @store64(i64 %v, i64* %p) {
   store i64 %v, i64* %p
   ret void
 }
+
+define void @store_zero(i32* %p) {
+  ;  NO_COMBINE_PTR_LABEL: store i64 0, i64* {{.*}}, align 2
+  store i32 0, i32* %p
+  ret void
+}