1 ; RUN: opt < %s -msan-check-access-address=0 -msan-track-origins=1 -S -passes='module(msan)' 2>&1 | FileCheck -allow-deprecated-dag-overlap --check-prefix=CHECK %s
3 target datalayout = "e-p:64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-v64:64:64-v128:128:128-a0:0:64-s0:64:64-f80:128:128-n8:16:32:64-S128"
4 target triple = "x86_64-unknown-linux-gnu"
7 define { i32, i8 } @main() sanitize_memory {
8 ; CHECK: [[P:%.*]] = inttoptr i64 0 to ptr
9 %p = inttoptr i64 0 to ptr
10 ; CHECK: [[O:%.*]] = load { i32, i8 }, ptr [[P]]
11 %o = load { i32, i8 }, ptr %p
12 ; CHECK: [[FIELD0:%.+]] = extractvalue { i32, i8 } %_msld, 0
13 ; CHECK: [[F0_POISONED:%.+]] = icmp ne i32 [[FIELD0]]
14 ; CHECK: [[FIELD1:%.+]] = extractvalue { i32, i8 } %_msld, 1
15 ; CHECK: [[F1_POISONED:%.+]] = icmp ne i8 [[FIELD1]]
16 ; CHECK: [[F1_OR:%.+]] = or i1 [[F0_POISONED]], [[F1_POISONED]]
17 ; CHECK-NOT: icmp ne i1 {{.*}}, false
18 ; CHECK: br i1 [[F1_OR]]
19 ; CHECK: call void @__msan_warning
20 ; CHECK: ret { i32, i8 } [[O]]