20 lines · plain
1; RUN: opt -S -passes='inferattrs,function(loop-mssa(licm))' < %s | FileCheck %s2 3define void @test(ptr noalias %loc, ptr noalias %a) {4; CHECK-LABEL: @test5; CHECK: @strlen6; CHECK-LABEL: loop:7 br label %loop8 9loop:10 %res = call i64 @strlen(ptr %a)11 store i64 %res, ptr %loc12 br label %loop13}14 15; CHECK: declare i64 @strlen(ptr captures(none)) #016; CHECK: attributes #0 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: read) }17declare i64 @strlen(ptr)18 19 20