blob: 7d3a5c1b9ece608a942f3872dfa10d61917f0530 [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
4
5define i32 @use(i8* %x) nounwind readonly {
6entry:
7 %0 = tail call i64 @strlen(i8* %x) nounwind readonly ; <i64> [#uses=1]
8 %1 = trunc i64 %0 to i32 ; <i32> [#uses=1]
9 ret i32 %1
10}
11
12declare i64 @strlen(i8*) nounwind readonly