150
|
1 ; RUN: llc -march=r600 -mcpu=cypress < %s | FileCheck -check-prefix=EG -check-prefix=FUNC %s
|
|
2 ; XFAIL: *
|
|
3
|
|
4 ; This is the failing part of the r600 bitacts tests
|
|
5
|
|
6 ; TODO: enable doubles
|
|
7 ; FUNC-LABEL: {{^}}bitcast_f64_to_v2i32:
|
252
|
8 define amdgpu_kernel void @bitcast_f64_to_v2i32(ptr addrspace(1) %out, ptr addrspace(1) %in) {
|
|
9 %val = load double, ptr addrspace(1) %in, align 8
|
150
|
10 %add = fadd double %val, 4.0
|
|
11 %bc = bitcast double %add to <2 x i32>
|
252
|
12 store <2 x i32> %bc, ptr addrspace(1) %out, align 8
|
150
|
13 ret void
|
|
14 }
|
|
15
|
|
16 ; FUNC-LABEL: {{^}}bitcast_v2i64_to_v2f64:
|
252
|
17 define amdgpu_kernel void @bitcast_v2i64_to_v2f64(i32 %cond, ptr addrspace(1) %out, <2 x i64> %value) {
|
150
|
18 entry:
|
|
19 %cmp0 = icmp eq i32 %cond, 0
|
|
20 br i1 %cmp0, label %if, label %end
|
|
21
|
|
22 if:
|
|
23 %cast = bitcast <2 x i64> %value to <2 x double>
|
|
24 br label %end
|
|
25
|
|
26 end:
|
|
27 %phi = phi <2 x double> [zeroinitializer, %entry], [%cast, %if]
|
252
|
28 store <2 x double> %phi, ptr addrspace(1) %out
|
150
|
29 ret void
|
|
30 }
|
|
31
|
|
32 ; FUNC-LABEL: {{^}}bitcast_v2f64_to_v2i64:
|
252
|
33 define amdgpu_kernel void @bitcast_v2f64_to_v2i64(i32 %cond, ptr addrspace(1) %out, <2 x double> %value) {
|
150
|
34 entry:
|
|
35 %cmp0 = icmp eq i32 %cond, 0
|
|
36 br i1 %cmp0, label %if, label %end
|
|
37
|
|
38 if:
|
|
39 %cast = bitcast <2 x double> %value to <2 x i64>
|
|
40 br label %end
|
|
41
|
|
42 end:
|
|
43 %phi = phi <2 x i64> [zeroinitializer, %entry], [%cast, %if]
|
252
|
44 store <2 x i64> %phi, ptr addrspace(1) %out
|
150
|
45 ret void
|
|
46 }
|