1 ;RUN: llc < %s -march=r600 -mcpu=redwood | FileCheck %s
6 define void @main() #0 {
8 %0 = call float @llvm.R600.load.input(i32 4)
9 %1 = call float @llvm.R600.load.input(i32 5)
10 %2 = call float @llvm.R600.load.input(i32 6)
11 %3 = call float @llvm.R600.load.input(i32 7)
12 %4 = call float @llvm.R600.load.input(i32 8)
13 %5 = fadd float %0, 2.0
14 %6 = fadd float %1, 3.0
15 %7 = fadd float %2, 4.0
16 %8 = fadd float %3, 5.0
17 %9 = bitcast float %4 to i32
19 %11 = bitcast i32 %10 to float
20 %12 = insertelement <4 x float> undef, float %5, i32 0
21 %13 = insertelement <4 x float> %12, float %6, i32 1
22 %14 = insertelement <4 x float> %13, float %7, i32 2
23 %15 = insertelement <4 x float> %14, float %8, i32 3
24 %16 = insertelement <4 x float> %15, float %11, i32 3
26 %17 = call float @llvm.AMDGPU.dp4(<4 x float> %15,<4 x float> %16)
27 %18 = insertelement <4 x float> undef, float %17, i32 0
28 call void @llvm.R600.store.swizzle(<4 x float> %18, i32 0, i32 2)
35 define void @main2() #0 {
37 %0 = call float @llvm.R600.load.input(i32 4)
38 %1 = call float @llvm.R600.load.input(i32 5)
39 %2 = call float @llvm.R600.load.input(i32 6)
40 %3 = call float @llvm.R600.load.input(i32 7)
41 %4 = call float @llvm.R600.load.input(i32 8)
42 %5 = fadd float %0, 2.0
43 %6 = fadd float %1, 3.0
44 %7 = fadd float %2, 4.0
45 %8 = fadd float %3, 2.0
46 %9 = bitcast float %4 to i32
48 %11 = bitcast i32 %10 to float
49 %12 = insertelement <4 x float> undef, float %5, i32 0
50 %13 = insertelement <4 x float> %12, float %6, i32 1
51 %14 = insertelement <4 x float> %13, float %7, i32 2
52 %15 = insertelement <4 x float> %14, float %8, i32 3
53 %16 = insertelement <4 x float> %15, float %11, i32 3
55 %17 = call float @llvm.AMDGPU.dp4(<4 x float> %15,<4 x float> %16)
56 %18 = insertelement <4 x float> undef, float %17, i32 0
57 call void @llvm.R600.store.swizzle(<4 x float> %18, i32 0, i32 2)
61 ; Function Attrs: readnone
62 declare float @llvm.R600.load.input(i32) #1
63 declare float @llvm.AMDGPU.dp4(<4 x float>, <4 x float>) #1
65 declare void @llvm.R600.store.swizzle(<4 x float>, i32, i32)
67 attributes #0 = { "ShaderType"="1" }
68 attributes #1 = { readnone }