1 ; RUN: opt -S -basicaa -dse < %s | FileCheck %s
3 declare i8* @strcpy(i8* %dest, i8* %src) nounwind
4 define void @test1(i8* %src) {
7 %dest = getelementptr inbounds [16 x i8]* %B, i64 0, i64 0
9 %call = call i8* @strcpy(i8* %dest, i8* %src)
14 declare i8* @strncpy(i8* %dest, i8* %src, i32 %n) nounwind
15 define void @test2(i8* %src) {
18 %dest = getelementptr inbounds [16 x i8]* %B, i64 0, i64 0
20 %call = call i8* @strncpy(i8* %dest, i8* %src, i32 12)
25 declare i8* @strcat(i8* %dest, i8* %src) nounwind
26 define void @test3(i8* %src) {
29 %dest = getelementptr inbounds [16 x i8]* %B, i64 0, i64 0
31 %call = call i8* @strcat(i8* %dest, i8* %src)
36 declare i8* @strncat(i8* %dest, i8* %src, i32 %n) nounwind
37 define void @test4(i8* %src) {
40 %dest = getelementptr inbounds [16 x i8]* %B, i64 0, i64 0
42 %call = call i8* @strncat(i8* %dest, i8* %src, i32 12)