1; Test that the msan layout customization options work as expected 2; 3; RUN: opt < %s -msan -msan-shadow-base 3735928559 -S | FileCheck --check-prefix=CHECK-BASE %s 4; RUN: opt < %s -msan -msan-shadow-base 3735928559 -msan-and-mask 4294901760 -S | FileCheck --check-prefix=CHECK-AND %s 5; RUN: opt < %s -msan -msan-shadow-base 3735928559 -msan-xor-mask 48879 -S | FileCheck --check-prefix=CHECK-XOR %s 6; RUN: opt < %s -msan -msan-shadow-base 3735928559 -msan-xor-mask 48879 -msan-and-mask 4294901760 -S | FileCheck --check-prefix=CHECK-XOR-AND %s 7; RUN: opt < %s -msan -msan-track-origins 1 -msan-origin-base 1777777 -S | FileCheck --check-prefix=CHECK-ORIGIN-BASE %s 8 9target triple = "x86_64-unknown-linux-gnu" 10 11define i32 @read_value(i32* %a) sanitize_memory { 12entry: 13 %tmp1 = load i32, i32* %a, align 4 14 ret i32 %tmp1 15} 16; CHECK-BASE-LABEL: @read_value 17; CHECK-BASE-NOT: ret i32 18; CHECK-BASE: add{{.*}}3735928559 19; CHECK-BASE: ret i32 20 21; CHECK-AND-LABEL: @read_value 22; CHECK-AND-NOT: ret i32 23; CHECK-AND: and{{.*}}-4294901761 24; CHECK-AND-NEXT: add{{.*}}3735928559 25; CHECK-AND: ret i32 26 27; CHECK-XOR-LABEL: @read_value 28; CHECK-XOR-NOT: ret i32 29; CHECK-XOR: xor{{.*}}48879 30; CHECK-XOR-NEXT: add{{.*}}3735928559 31; CHECK-XOR: ret i32 32 33; CHECK-XOR-AND-LABEL: @read_value 34; CHECK-XOR-AND-NOT: ret i32 35; CHECK-XOR-AND: and{{.*}}-4294901761 36; CHECK-XOR-AND-NEXT: xor{{.*}}48879 37; CHECK-XOR-AND-NEXT: add{{.*}}3735928559 38; CHECK-XOR-AND: ret i32 39 40; CHECK-ORIGIN-BASE-LABEL: @read_value 41; CHECK-ORIGIN-BASE-NOT: ret i32 42; CHECK-ORIGIN-BASE: add{{.*}}1777777 43; CHECK-ORIGIN-BASE: ret i32 44