1; RUN: opt < %s -S -passes='module(msan-module),function(msan)' 2>&1 | FileCheck %s 2 3target 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" 4target triple = "x86_64-unknown-linux-gnu" 5 6 7declare void @a_() sanitize_memory readnone 8declare void @b_() sanitize_memory readonly 9declare void @c_() sanitize_memory writeonly 10declare void @d_(i32* %p) sanitize_memory writeonly argmemonly 11declare void @e_() sanitize_memory speculatable 12 13define void @a() sanitize_memory readnone { 14entry: 15 call void @a_() 16 call void @a_() readnone 17 ret void 18} 19 20define void @b() sanitize_memory readonly { 21entry: 22 call void @b_() 23 call void @b_() readonly 24 ret void 25} 26 27define void @c() sanitize_memory writeonly { 28entry: 29 call void @c_() 30 call void @c_() writeonly 31 ret void 32} 33 34define void @d(i32* %p) sanitize_memory writeonly argmemonly { 35entry: 36 call void @d_(i32* %p) 37 call void @d_(i32* %p) writeonly argmemonly 38 ret void 39} 40 41define void @e() sanitize_memory speculatable { 42entry: 43 call void @e_() 44 ret void 45} 46 47; CHECK-NOT: readnone 48; CHECK-NOT: readonly 49; CHECK-NOT: writeonly 50; CHECK-NOT: argmemonly 51; CHECK-NOT: speculatable 52 53; CHECK: Function Attrs: nofree nosync nounwind readnone willreturn 54; CHECK-NEXT: declare void @llvm.donothing 55