xref: /aosp_15_r20/external/llvm/test/Transforms/InstCombine/2009-02-11-NotInitialized.ll (revision 9880d6810fe72a1726cb53787c6711e909410d58)
1*9880d681SAndroid Build Coastguard Worker; RUN: opt < %s -inline -instcombine -functionattrs | llvm-dis
2*9880d681SAndroid Build Coastguard Worker;
3*9880d681SAndroid Build Coastguard Worker; Check that nocapture attributes are added when run after an SCC pass.
4*9880d681SAndroid Build Coastguard Worker; PR3520
5*9880d681SAndroid Build Coastguard Worker
6*9880d681SAndroid Build Coastguard Workerdefine i32 @use(i8* %x) nounwind readonly {
7*9880d681SAndroid Build Coastguard Worker; CHECK: @use(i8* nocapture %x)
8*9880d681SAndroid Build Coastguard Worker  %1 = tail call i64 @strlen(i8* %x) nounwind readonly
9*9880d681SAndroid Build Coastguard Worker  %2 = trunc i64 %1 to i32
10*9880d681SAndroid Build Coastguard Worker  ret i32 %2
11*9880d681SAndroid Build Coastguard Worker}
12*9880d681SAndroid Build Coastguard Worker
13*9880d681SAndroid Build Coastguard Workerdeclare i64 @strlen(i8*) nounwind readonly
14*9880d681SAndroid Build Coastguard Worker; CHECK: declare i64 @strlen(i8* nocapture) nounwind readonly
15