From 341bfd40b316b21d789038fc481a669d9829b8ba Mon Sep 17 00:00:00 2001 From: Evgeniy Stepanov Date: Tue, 24 Nov 2015 21:44:16 +0000 Subject: [PATCH] [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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@254027 91177308-0d34-0410-b5e6-96231b3b80d8 --- test/Instrumentation/MemorySanitizer/origin-alignment.ll | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/test/Instrumentation/MemorySanitizer/origin-alignment.ll b/test/Instrumentation/MemorySanitizer/origin-alignment.ll index 562d194ac4c..abd8dd0e533 100644 --- a/test/Instrumentation/MemorySanitizer/origin-alignment.ll +++ b/test/Instrumentation/MemorySanitizer/origin-alignment.ll @@ -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