52 lines · plain
1; RUN: opt < %s -S -passes='module(msan)' 2>&1 | FileCheck %s2 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 readnone8declare void @b_() sanitize_memory readonly9declare void @c_() sanitize_memory writeonly10declare void @d_(ptr %p) sanitize_memory writeonly argmemonly11declare void @e_() sanitize_memory speculatable12 13define void @a() sanitize_memory readnone {14entry:15 call void @a_()16 call void @a_() readnone17 ret void18}19 20define void @b() sanitize_memory readonly {21entry:22 call void @b_()23 call void @b_() readonly24 ret void25}26 27define void @c() sanitize_memory writeonly {28entry:29 call void @c_()30 call void @c_() writeonly31 ret void32}33 34define void @d(ptr %p) sanitize_memory writeonly argmemonly {35entry:36 call void @d_(ptr %p)37 call void @d_(ptr %p) writeonly argmemonly38 ret void39}40 41define void @e() sanitize_memory speculatable {42entry:43 call void @e_()44 ret void45}46 47; CHECK-NOT: memory(48; CHECK-NOT: speculatable49 50; CHECK: Function Attrs: nocallback nofree nosync nounwind willreturn memory(none)51; CHECK-NEXT: declare void @llvm.donothing52