Dan Gohman | f2f6ce6 | 2009-09-11 18:01:28 +0000 | [diff] [blame^] | 1 | ; RUN: opt < %s -inline -simplify-libcalls -functionattrs | \ |
Nick Lewycky | 8968a07 | 2009-02-13 07:15:53 +0000 | [diff] [blame] | 2 | ; RUN: llvm-dis | grep nocapture | count 2 |
Duncan Sands | af06875 | 2009-02-11 09:58:43 +0000 | [diff] [blame] | 3 | ; Check that nocapture attributes are added when run after an SCC pass. |
| 4 | ; PR3520 |
Duncan Sands | af06875 | 2009-02-11 09:58:43 +0000 | [diff] [blame] | 5 | |
| 6 | define i32 @use(i8* %x) nounwind readonly { |
| 7 | entry: |
| 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 | |
| 13 | declare i64 @strlen(i8*) nounwind readonly |