xref: /minix3/external/bsd/llvm/dist/clang/test/CodeGen/block-copy.c (revision f4a2713ac843a11c696ec80c0a5e3e5d80b4d338)
1*f4a2713aSLionel Sambuc /* RUN: %clang_cc1 %s -emit-llvm -o - | FileCheck %s
2*f4a2713aSLionel Sambuc 
3*f4a2713aSLionel Sambuc  This should compile into a memcpy from a global, not 128 stores. */
4*f4a2713aSLionel Sambuc 
5*f4a2713aSLionel Sambuc 
6*f4a2713aSLionel Sambuc 
7*f4a2713aSLionel Sambuc void foo();
8*f4a2713aSLionel Sambuc 
bar()9*f4a2713aSLionel Sambuc float bar() {
10*f4a2713aSLionel Sambuc   float lookupTable[] = {-1,-1,-1,0, -1,-1,0,-1, -1,-1,0,1, -1,-1,1,0,
11*f4a2713aSLionel Sambuc 			 -1,0,-1,-1, -1,0,-1,1, -1,0,1,-1, -1,0,1,1,
12*f4a2713aSLionel Sambuc 			 -1,1,-1,0, -1,1,0,-1, -1,1,0,1, -1,1,1,0,
13*f4a2713aSLionel Sambuc 			 0,-1,-1,-1, 0,-1,-1,1, 0,-1,1,-1, 0,-1,1,1,
14*f4a2713aSLionel Sambuc 			 1,-1,-1,0, 1,-1,0,-1, 1,-1,0,1, 1,-1,1,0,
15*f4a2713aSLionel Sambuc 			 1,0,-1,-1, 1,0,-1,1, 1,0,1,-1, 1,0,1,1,
16*f4a2713aSLionel Sambuc 			 1,1,-1,0, 1,1,0,-1, 1,1,0,1, 1,1,1,0,
17*f4a2713aSLionel Sambuc 			 0,1,-1,-1, 0,1,-1,1, 0,1,1,-1, 0,1,1,1};
18*f4a2713aSLionel Sambuc   // CHECK: memcpy
19*f4a2713aSLionel Sambuc   foo(lookupTable);
20*f4a2713aSLionel Sambuc }
21