blob: 52b3a1d174a09fc19073e23728d6d3477c66c9b2 [file] [log] [blame]
Daniel Dunbar62c29c62009-02-16 21:52:05 +00001// RUN: clang -arch i386 -emit-llvm -o %t %s &&
2// RUN: grep '@llvm.memset.i32' %t &&
3// RUN: grep '@llvm.memcpy.i32' %t &&
4// RUN: grep '@llvm.memmove.i32' %t &&
5// RUN: grep __builtin %t | count 0
Daniel Dunbar1caae952008-07-22 00:26:45 +00006
7int main(int argc, char **argv) {
8 unsigned char a = 0x11223344;
9 unsigned char b = 0x11223344;
10 __builtin_bzero(&a, sizeof(a));
11 __builtin_memset(&a, 0, sizeof(a));
12 __builtin_memcpy(&a, &b, sizeof(a));
13 __builtin_memmove(&a, &b, sizeof(a));
14 return 0;
15}