1 ; RUN: opt -S -passes=licm %s | FileCheck %s
2 @v_1 = global i8 0, align 1
3 @v_2 = global i8 0, align 1
9 ; CHECK: call void @llvm.memcpy.p0.p0.i64
15 for.cond: ; preds = %for.body, %entry
16 %0 = phi i16 [ %inc, %for.body ], [ 0, %entry ]
17 %cmp = icmp slt i16 %0, 1
18 br i1 %cmp, label %for.body, label %for.end
20 for.body: ; preds = %for.cond
21 call void @llvm.memcpy.p0.p0.i64(ptr @v_1, ptr @v_2, i64 1, i1 false)
22 store i8 1, ptr @v_2, align 1
23 %inc = add nsw i16 %0, 1
26 for.end: ; preds = %for.cond
30 ; Function Attrs: argmemonly nounwind willreturn
31 declare void @llvm.memcpy.p0.p0.i64(ptr noalias nocapture writeonly, ptr noalias nocapture readonly, i64, i1 immarg) #2
33 attributes #2 = { argmemonly nounwind willreturn }