1 ; RUN: opt < %s -correlated-propagation -S | FileCheck %s
3 define void @test1(i8* %ptr) {
13 define void @test2(i8* %ptr) {
18 icmp ne i8* %ptr, null
23 define void @test3() {
28 icmp ne i8* %ptr, null
33 declare void @llvm.memcpy.p0i8.p0i8.i32(i8*, i8*, i32, i32, i1)
34 define void @test4(i8* %dest, i8* %src) {
36 call void @llvm.memcpy.p0i8.p0i8.i32(i8* %dest, i8* %src, i32 1, i32 1, i1 false)
39 icmp ne i8* %dest, null
40 icmp ne i8* %src, null
45 declare void @llvm.memmove.p0i8.p0i8.i32(i8*, i8*, i32, i32, i1)
46 define void @test5(i8* %dest, i8* %src) {
48 call void @llvm.memmove.p0i8.p0i8.i32(i8* %dest, i8* %src, i32 1, i32 1, i1 false)
51 icmp ne i8* %dest, null
52 icmp ne i8* %src, null
57 declare void @llvm.memset.p0i8.i32(i8*, i8, i32, i32, i1)
58 define void @test6(i8* %dest) {
60 call void @llvm.memset.p0i8.i32(i8* %dest, i8 255, i32 1, i32 1, i1 false)
63 icmp ne i8* %dest, null
68 define void @test7(i8* %dest, i8* %src, i32 %len) {
70 call void @llvm.memcpy.p0i8.p0i8.i32(i8* %dest, i8* %src, i32 %len, i32 1, i1 false)
73 %KEEP1 = icmp ne i8* %dest, null
75 %KEEP2 = icmp ne i8* %src, null
80 declare void @llvm.memcpy.p1i8.p1i8.i32(i8 addrspace(1) *, i8 addrspace(1) *, i32, i32, i1)
81 define void @test8(i8 addrspace(1) * %dest, i8 addrspace(1) * %src) {
83 call void @llvm.memcpy.p1i8.p1i8.i32(i8 addrspace(1) * %dest, i8 addrspace(1) * %src, i32 1, i32 1, i1 false)
86 %KEEP1 = icmp ne i8 addrspace(1) * %dest, null
88 %KEEP2 = icmp ne i8 addrspace(1) * %src, null
93 define void @test9(i8* %dest, i8* %src) {
95 call void @llvm.memcpy.p0i8.p0i8.i32(i8* %dest, i8* %src, i32 1, i32 1, i1 true)
98 %KEEP1 = icmp ne i8* %dest, null
100 %KEEP2 = icmp ne i8* %src, null