]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - test/CodeGen/block-copy.c
Vendor import of clang RELEASE_360/rc2 tag r227651 (effectively, 3.6.0 RC2):
[FreeBSD/FreeBSD.git] / test / CodeGen / block-copy.c
1 /* RUN: %clang_cc1 %s -emit-llvm -o - | FileCheck %s
2
3  This should compile into a memcpy from a global, not 128 stores. */
4
5
6
7 void foo();
8
9 float bar() {
10   float lookupTable[] = {-1,-1,-1,0, -1,-1,0,-1, -1,-1,0,1, -1,-1,1,0,
11                          -1,0,-1,-1, -1,0,-1,1, -1,0,1,-1, -1,0,1,1,
12                          -1,1,-1,0, -1,1,0,-1, -1,1,0,1, -1,1,1,0,
13                          0,-1,-1,-1, 0,-1,-1,1, 0,-1,1,-1, 0,-1,1,1,
14                          1,-1,-1,0, 1,-1,0,-1, 1,-1,0,1, 1,-1,1,0,
15                          1,0,-1,-1, 1,0,-1,1, 1,0,1,-1, 1,0,1,1,
16                          1,1,-1,0, 1,1,0,-1, 1,1,0,1, 1,1,1,0,
17                          0,1,-1,-1, 0,1,-1,1, 0,1,1,-1, 0,1,1,1};
18   // CHECK: memcpy
19   foo(lookupTable);
20 }