Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(231)

Unified Diff: tests_lit/asan_tests/instrumentstore.ll

Issue 2183643002: Subzero: Elide checks of known valid accesses of locals (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: Added test Created 4 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: tests_lit/asan_tests/instrumentstore.ll
diff --git a/tests_lit/asan_tests/instrumentstore.ll b/tests_lit/asan_tests/instrumentstore.ll
index b9ac8e5a206b17215afb37000c42a96d47cd2801..8517957b9d2f82763a1e90c54aa6a95c168811ef 100644
--- a/tests_lit/asan_tests/instrumentstore.ll
+++ b/tests_lit/asan_tests/instrumentstore.ll
@@ -13,12 +13,9 @@
@destGlobal128 = internal global [16 x i8] zeroinitializer
; A function with a local variable that does the stores
-define internal void @doStores(<4 x i32> %vecSrc) {
- %destLocal8 = alloca i8, i32 1, align 4
- %destLocal16 = alloca i8, i32 2, align 4
- %destLocal32 = alloca i8, i32 4, align 4
- %destLocal64 = alloca i8, i32 8, align 4
- %destLocal128 = alloca i8, i32 16, align 4
+define internal void @doStores(<4 x i32> %vecSrc, i8* %destLocal8,
Jim Stichnoth 2016/07/26 12:49:26 Same comment about int/pointer args.
tlively 2016/07/26 17:58:53 Done.
+ i16* %destLocal16, i32* %destLocal32,
+ i64* %destLocal64, <4 x i32>* %destLocal128) {
%ptrGlobal8 = bitcast [1 x i8]* @destGlobal8 to i8*
%ptrGlobal16 = bitcast [2 x i8]* @destGlobal16 to i16*
@@ -26,31 +23,25 @@ define internal void @doStores(<4 x i32> %vecSrc) {
%ptrGlobal64 = bitcast [8 x i8]* @destGlobal64 to i64*
%ptrGlobal128 = bitcast [16 x i8]* @destGlobal128 to <4 x i32>*
- %ptrLocal8 = bitcast i8* %destLocal8 to i8*
- %ptrLocal16 = bitcast i8* %destLocal16 to i16*
- %ptrLocal32 = bitcast i8* %destLocal32 to i32*
- %ptrLocal64 = bitcast i8* %destLocal64 to i64*
- %ptrLocal128 = bitcast i8* %destLocal128 to <4 x i32>*
-
store i8 42, i8* %ptrGlobal8, align 1
store i16 42, i16* %ptrGlobal16, align 1
store i32 42, i32* %ptrGlobal32, align 1
store i64 42, i64* %ptrGlobal64, align 1
store <4 x i32> %vecSrc, <4 x i32>* %ptrGlobal128, align 4
- store i8 42, i8* %ptrLocal8, align 1
- store i16 42, i16* %ptrLocal16, align 1
- store i32 42, i32* %ptrLocal32, align 1
- store i64 42, i64* %ptrLocal64, align 1
- store <4 x i32> %vecSrc, <4 x i32>* %ptrLocal128, align 4
+ store i8 42, i8* %destLocal8, align 1
+ store i16 42, i16* %destLocal16, align 1
+ store i32 42, i32* %destLocal32, align 1
+ store i64 42, i64* %destLocal64, align 1
+ store <4 x i32> %vecSrc, <4 x i32>* %destLocal128, align 4
ret void
}
; DUMP-LABEL: ================ Instrumented CFG ================
-; DUMP-NEXT: define internal void @doStores(<4 x i32> %vecSrc) {
+; DUMP-NEXT: define internal void @doStores(
; DUMP-NEXT: __0:
-; DUMP: call void @__asan_check_store(i32 @destGlobal8, i32 1)
+; DUMP-NEXT: call void @__asan_check_store(i32 @destGlobal8, i32 1)
; DUMP-NEXT: store i8 42, i8* @destGlobal8, align 1
; DUMP-NEXT: call void @__asan_check_store(i32 @destGlobal16, i32 2)
; DUMP-NEXT: store i16 42, i16* @destGlobal16, align 1
« tests_lit/asan_tests/instrumentload.ll ('K') | « tests_lit/asan_tests/instrumentload.ll ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698