blob: ac89199b0ec128ac9fc80b15c4fd7d6e68623f03 [file] [log] [blame]
Dan Gohmanf2f6ce62009-09-11 18:01:28 +00001; RUN: opt < %s -inline -simplify-libcalls -functionattrs | \
Nick Lewycky8968a072009-02-13 07:15:53 +00002; RUN: llvm-dis | grep nocapture | count 2
Duncan Sandsaf068752009-02-11 09:58:43 +00003; Check that nocapture attributes are added when run after an SCC pass.
4; PR3520
Duncan Sandsaf068752009-02-11 09:58:43 +00005
6define i32 @use(i8* %x) nounwind readonly {
7entry:
8 %0 = tail call i64 @strlen(i8* %x) nounwind readonly ; <i64> [#uses=1]
9 %1 = trunc i64 %0 to i32 ; <i32> [#uses=1]
10 ret i32 %1
11}
12
13declare i64 @strlen(i8*) nounwind readonly