1 ; RUN: opt -S -inferattrs -basicaa -licm < %s | FileCheck %s 2 3 define void @test(i64* noalias %loc, i8* noalias %a) { 4 ; CHECK-LABEL: @test 5 ; CHECK: @strlen 6 ; CHECK-LABEL: loop: 7 br label %loop 8 9 loop: 10 %res = call i64 @strlen(i8* %a) 11 store i64 %res, i64* %loc 12 br label %loop 13 } 14 15 ; CHECK: declare i64 @strlen(i8* nocapture) #0 16 ; CHECK: attributes #0 = { argmemonly nounwind readonly } 17 declare i64 @strlen(i8*) 18 19 20