1; RUN: opt < %s -msan-check-access-address=0 -msan-track-origins=1 -S -passes='module(msan-module),function(msan)' 2>&1 | \ 2; RUN: FileCheck -allow-deprecated-dag-overlap -check-prefixes=CHECK,CHECK-ORIGINS %s 3 4target 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" 5target triple = "x86_64-unknown-linux-gnu" 6 7; CHECK-LABEL: @main 8define { i32, i8 } @main() sanitize_memory { 9; CHECK: [[P:%.*]] = inttoptr i64 0 to { i32, i8 }* 10 %p = inttoptr i64 0 to { i32, i8 } * 11; CHECK: [[O:%.*]] = load { i32, i8 }, { i32, i8 }* [[P]] 12 %o = load { i32, i8 }, { i32, i8 } *%p 13; CHECK: [[FIELD0:%.+]] = extractvalue { i32, i8 } %_msld, 0 14; CHECK: [[F0_POISONED:%.+]] = icmp ne i32 [[FIELD0]] 15; CHECK: [[FIELD1:%.+]] = extractvalue { i32, i8 } %_msld, 1 16; CHECK: [[F1_POISONED:%.+]] = icmp ne i8 [[FIELD1]] 17; CHECK: [[F1_OR:%.+]] = or i1 [[F0_POISONED]], [[F1_POISONED]] 18; CHECK-NOT: icmp ne i1 {{.*}}, false 19; CHECK: br i1 [[F1_OR]] 20; CHECK: call void @__msan_warning 21; CHECK: ret { i32, i8 } [[O]] 22 ret { i32, i8 } %o 23} 24