1 ; RUN: opt < %s -scalarrepl -S | not grep {call.*memcpy}
2 @C.0.1248 = internal constant [128 x float] [ float -1.000000e+00, float -1.000000e+00, float -1.000000e+00, float 0.000000e+00, float -1.000000e+00, float -1.000000e+00, float 0.000000e+00, float -1.000000e+00, float -1.000000e+00, float -1.000000e+00, float 0.000000e+00, float 1.000000e+00, float -1.000000e+00, float -1.000000e+00, float 1.000000e+00, float 0.000000e+00, float -1.000000e+00, float 0.000000e+00, float -1.000000e+00, float -1.000000e+00, float -1.000000e+00, float 0.000000e+00, float -1.000000e+00, float 1.000000e+00, float -1.000000e+00, float 0.000000e+00, float 1.000000e+00, float -1.000000e+00, float -1.000000e+00, float 0.000000e+00, float 1.000000e+00, float 1.000000e+00, float -1.000000e+00, float 1.000000e+00, float -1.000000e+00, float 0.000000e+00, float -1.000000e+00, float 1.000000e+00, float 0.000000e+00, float -1.000000e+00, float -1.000000e+00, float 1.000000e+00, float 0.000000e+00, float 1.000000e+00, float -1.000000e+00, float 1.000000e+00, float 1.000000e+00, float 0.000000e+00, float 0.000000e+00, float -1.000000e+00, float -1.000000e+00, float -1.000000e+00, float 0.000000e+00, float -1.000000e+00, float -1.000000e+00, float 1.000000e+00, float 0.000000e+00, float -1.000000e+00, float 1.000000e+00, float -1.000000e+00, float 0.000000e+00, float -1.000000e+00, float 1.000000e+00, float 1.000000e+00, float 1.000000e+00, float -1.000000e+00, float -1.000000e+00, float 0.000000e+00, float 1.000000e+00, float -1.000000e+00, float 0.000000e+00, float -1.000000e+00, float 1.000000e+00, float -1.000000e+00, float 0.000000e+00, float 1.000000e+00, float 1.000000e+00, float -1.000000e+00, float 1.000000e+00, float 0.000000e+00, float 1.000000e+00, float 0.000000e+00, float -1.000000e+00, float -1.000000e+00, float 1.000000e+00, float 0.000000e+00, float -1.000000e+00, float 1.000000e+00, float 1.000000e+00, float 0.000000e+00, float 1.000000e+00, float -1.000000e+00, float 1.000000e+00, float 0.000000e+00, float 1.000000e+00, float 1.000000e+00, float 1.000000e+00, float 1.000000e+00, float -1.000000e+00, float 0.000000e+00, float 1.000000e+00, float 1.000000e+00, float 0.000000e+00, float -1.000000e+00, float 1.000000e+00, float 1.000000e+00, float 0.000000e+00, float 1.000000e+00, float 1.000000e+00, float 1.000000e+00, float 1.000000e+00, float 0.000000e+00, float 0.000000e+00, float 1.000000e+00, float -1.000000e+00, float -1.000000e+00, float 0.000000e+00, float 1.000000e+00, float -1.000000e+00, float 1.000000e+00, float 0.000000e+00, float 1.000000e+00, float 1.000000e+00, float -1.000000e+00, float 0.000000e+00, float 1.000000e+00, float 1.000000e+00, float 1.000000e+00 ], align 32 ; <[128 x float]*> [#uses=1]
4 define float @grad4(i32 %hash, float %x, float %y, float %z, float %w) {
6 %lookupTable = alloca [128 x float], align 16 ; <[128 x float]*> [#uses=5]
7 %lookupTable1 = bitcast [128 x float]* %lookupTable to i8* ; <i8*> [#uses=1]
8 call void @llvm.memcpy.i32( i8* %lookupTable1, i8* bitcast ([128 x float]* @C.0.1248 to i8*), i32 512, i32 16 )
9 %tmp3 = shl i32 %hash, 2 ; <i32> [#uses=1]
10 %tmp5 = and i32 %tmp3, 124 ; <i32> [#uses=4]
11 %tmp753 = getelementptr [128 x float]* %lookupTable, i32 0, i32 %tmp5 ; <float*> [#uses=1]
12 %tmp9 = load float* %tmp753 ; <float> [#uses=1]
13 %tmp11 = fmul float %tmp9, %x ; <float> [#uses=1]
14 %tmp13 = fadd float %tmp11, 0.000000e+00 ; <float> [#uses=1]
15 %tmp17.sum52 = or i32 %tmp5, 1 ; <i32> [#uses=1]
16 %tmp1851 = getelementptr [128 x float]* %lookupTable, i32 0, i32 %tmp17.sum52 ; <float*> [#uses=1]
17 %tmp19 = load float* %tmp1851 ; <float> [#uses=1]
18 %tmp21 = fmul float %tmp19, %y ; <float> [#uses=1]
19 %tmp23 = fadd float %tmp21, %tmp13 ; <float> [#uses=1]
20 %tmp27.sum50 = or i32 %tmp5, 2 ; <i32> [#uses=1]
21 %tmp2849 = getelementptr [128 x float]* %lookupTable, i32 0, i32 %tmp27.sum50 ; <float*> [#uses=1]
22 %tmp29 = load float* %tmp2849 ; <float> [#uses=1]
23 %tmp31 = fmul float %tmp29, %z ; <float> [#uses=1]
24 %tmp33 = fadd float %tmp31, %tmp23 ; <float> [#uses=1]
25 %tmp37.sum48 = or i32 %tmp5, 3 ; <i32> [#uses=1]
26 %tmp3847 = getelementptr [128 x float]* %lookupTable, i32 0, i32 %tmp37.sum48 ; <float*> [#uses=1]
27 %tmp39 = load float* %tmp3847 ; <float> [#uses=1]
28 %tmp41 = fmul float %tmp39, %w ; <float> [#uses=1]
29 %tmp43 = fadd float %tmp41, %tmp33 ; <float> [#uses=1]
33 declare void @llvm.memcpy.i32(i8*, i8*, i32, i32)