blob: 41ab1d145fb87da7c09126f82226b9527d86404d [file] [log] [blame]
Duncan Sands91e64742009-02-11 09:58:43 +00001; RUN: llvm-as < %s | opt -std-compile-opts | llvm-dis | grep nocapture | count 2
2; Check that nocapture attributes are added when run after an SCC pass.
3; PR3520
Bill Wendlinga60551c2009-02-11 18:19:24 +00004; XFAIL: *
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