brintos

brintos / llvm-project-archived public Read only

0
0
Text · 451 B · 299f988 Raw
18 lines · c
1// RUN: %clang_cc1 -emit-llvm %s -o - | FileCheck %s2struct x { int a[100]; };3 4 5void foo(struct x *P, struct x *Q) {6// CHECK-LABEL: @foo(7// CHECK:    call void @llvm.memcpy.p0.p08  *P = *Q;9}10 11// CHECK: declare void @llvm.memcpy.p0.p0{{.*}}(ptr noalias writeonly captures(none), ptr noalias readonly12 13void bar(struct x *P, struct x *Q) {14// CHECK-LABEL: @bar(15// CHECK:    call void @llvm.memcpy.p0.p016  __builtin_memcpy(P, Q, sizeof(struct x));17}18