1 ; RUN: opt < %s -simplify-libcalls -S | FileCheck %s 2 3 ; Test that we add nocapture to the declaration, and to the second call only. 4 5 ; CHECK: declare float @strtol(i8*, i8** nocapture, i32) nounwind 6 declare float @strtol(i8* %s, i8** %endptr, i32 %base) 7 8 define void @foo(i8* %x, i8** %endptr) { 9 ; CHECK: call float @strtol(i8* %x, i8** %endptr, i32 10) 10 call float @strtol(i8* %x, i8** %endptr, i32 10) 11 ; CHECK: %2 = call float @strtol(i8* nocapture %x, i8** null, i32 10) 12 call float @strtol(i8* %x, i8** null, i32 10) 13 ret void 14 } 15