blob: 551a2bb6b9904022359cef61f6965749fdd8c834 [file] [log] [blame]
Nick Lewycky6f9646c2009-02-13 07:15:53 +00001; RUN: llvm-as < %s | opt -inline -simplify-libcalls -functionattrs | \
2; RUN: llvm-dis | grep nocapture | count 2
Duncan Sands91e64742009-02-11 09:58:43 +00003; Check that nocapture attributes are added when run after an SCC pass.
4; PR3520
Duncan Sands91e64742009-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