[llvm] r254027 - [msan] Relax origin-alignment test.

Evgeniy Stepanov via llvm-commits llvm-commits at lists.llvm.org
Tue Nov 24 13:44:16 PST 2015


Author: eugenis
Date: Tue Nov 24 15:44:16 2015
New Revision: 254027

URL: http://llvm.org/viewvc/llvm-project?rev=254027&view=rev
Log:
[msan] Relax origin-alignment test.

Change origin-alignment test to test only the alignment of the origin
store, and not the exact instruction sequence used to compute the
address. This makes the test less fragile and, in particular, lets it
pass both with the old and new MSan ABIs.

Modified:
    llvm/trunk/test/Instrumentation/MemorySanitizer/origin-alignment.ll

Modified: llvm/trunk/test/Instrumentation/MemorySanitizer/origin-alignment.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Instrumentation/MemorySanitizer/origin-alignment.ll?rev=254027&r1=254026&r2=254027&view=diff
==============================================================================
--- llvm/trunk/test/Instrumentation/MemorySanitizer/origin-alignment.ll (original)
+++ llvm/trunk/test/Instrumentation/MemorySanitizer/origin-alignment.ll Tue Nov 24 15:44:16 2015
@@ -24,7 +24,7 @@ entry:
 ; CHECK-ORIGINS1: [[ORIGIN:%[01-9a-z]+]] = load {{.*}} @__msan_param_origin_tls
 ; CHECK-ORIGINS2: [[ORIGIN0:%[01-9a-z]+]] = load {{.*}} @__msan_param_origin_tls
 ; CHECK-ORIGINS2: [[ORIGIN:%[01-9a-z]+]] = call i32 @__msan_chain_origin(i32 [[ORIGIN0]])
-; CHECK: store i32 [[ORIGIN]], i32* inttoptr (i64 add (i64 xor (i64 ptrtoint (i8* @a8 to i64), i64 {{.*}}), i64 {{.*}}) to i32*), align 8
+; CHECK: store i32 [[ORIGIN]], {{.*}}, align 8
 ; CHECK: ret void
 
 
@@ -39,7 +39,7 @@ entry:
 ; CHECK-ORIGINS1: [[ORIGIN:%[01-9a-z]+]] = load {{.*}} @__msan_param_origin_tls
 ; CHECK-ORIGINS2: [[ORIGIN0:%[01-9a-z]+]] = load {{.*}} @__msan_param_origin_tls
 ; CHECK-ORIGINS2: [[ORIGIN:%[01-9a-z]+]] = call i32 @__msan_chain_origin(i32 [[ORIGIN0]])
-; CHECK: store i32 [[ORIGIN]], i32* inttoptr (i64 add (i64 xor (i64 ptrtoint (i8* @a4 to i64), i64 {{.*}}), i64 {{.*}}) to i32*), align 4
+; CHECK: store i32 [[ORIGIN]], {{.*}}, align 4
 ; CHECK: ret void
 
 
@@ -54,8 +54,7 @@ entry:
 ; CHECK-ORIGINS1: [[ORIGIN:%[01-9a-z]+]] = load {{.*}} @__msan_param_origin_tls
 ; CHECK-ORIGINS2: [[ORIGIN0:%[01-9a-z]+]] = load {{.*}} @__msan_param_origin_tls
 ; CHECK-ORIGINS2: [[ORIGIN:%[01-9a-z]+]] = call i32 @__msan_chain_origin(i32 [[ORIGIN0]])
-; CHECK: store i32 [[ORIGIN]],  i32* inttoptr (i64 and (i64 add (i64 xor (i64 ptrtoint (i8* @a2 to i64), i64 {{.*}}), i64 {{.*}}), i64 -4) to i32*), align 4
-
+; CHECK: store i32 [[ORIGIN]], {{.*}}, align 4
 ; CHECK: ret void
 
 
@@ -70,6 +69,6 @@ entry:
 ; CHECK-ORIGINS1: [[ORIGIN:%[01-9a-z]+]] = load {{.*}} @__msan_param_origin_tls
 ; CHECK-ORIGINS2: [[ORIGIN0:%[01-9a-z]+]] = load {{.*}} @__msan_param_origin_tls
 ; CHECK-ORIGINS2: [[ORIGIN:%[01-9a-z]+]] = call i32 @__msan_chain_origin(i32 [[ORIGIN0]])
-; CHECK: store i32 [[ORIGIN]], i32* inttoptr (i64 and (i64 add (i64 xor (i64 ptrtoint (i8* @a1 to i64), i64 {{.*}}), i64 {{.*}}), i64 -4) to i32*), align 4
+; CHECK: store i32 [[ORIGIN]], {{.*}}, align 4
 
 ; CHECK: ret void




More information about the llvm-commits mailing list