1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-26 04:32:44 +01:00
llvm-mirror/test/Transforms/LICM/strlen.ll
Philip Reames 37583a96a8 Reapply "[InferAttributes] Materialize all infered attributes for declaration"" and follow on patches.
This reverts commit ab98f2c7129a52e216fd7e088b964cf4af27b0f2 and 98eea392cdbcdb7360e58b46e9329573f092cd96.

It includes a fix for the clang test which triggered the revert.  I failed to notice this one because there was another AMDGPU llvm test with a similiar name and the exact same text in the error message.  Odd.  Since only one build bot reported the clang test, I didn't notice that one.
2021-04-14 16:38:07 -07:00

20 lines
446 B
LLVM

; RUN: opt -S -inferattrs -basic-aa -licm < %s | FileCheck %s
define void @test(i64* noalias %loc, i8* noalias %a) {
; CHECK-LABEL: @test
; CHECK: @strlen
; CHECK-LABEL: loop:
br label %loop
loop:
%res = call i64 @strlen(i8* %a)
store i64 %res, i64* %loc
br label %loop
}
; CHECK: declare i64 @strlen(i8* nocapture) #0
; CHECK: attributes #0 = { argmemonly nofree nounwind readonly willreturn mustprogress }
declare i64 @strlen(i8*)