blob: 5bfc0083667866295c15c60de7aa3fae60e8c94f [file] [log] [blame]
Tom Stellard70f13db2013-10-10 17:11:46 +00001; RUN: llc < %s -march=r600 -mcpu=SI -verify-machineinstrs | FileCheck %s
Tom Stellard20ee94f2013-08-14 22:22:09 +00002
3; This test just checks that the compiler doesn't crash.
4; CHECK-LABEL: @v32i8_to_v8i32
5; CHECK: S_ENDPGM
6
7define void @v32i8_to_v8i32(<32 x i8> addrspace(2)* inreg) #0 {
8entry:
9 %1 = load <32 x i8> addrspace(2)* %0
10 %2 = bitcast <32 x i8> %1 to <8 x i32>
11 %3 = extractelement <8 x i32> %2, i32 1
12 %4 = icmp ne i32 %3, 0
13 %5 = select i1 %4, float 0.0, float 1.0
14 call void @llvm.SI.export(i32 15, i32 1, i32 1, i32 0, i32 1, float %5, float %5, float %5, float %5)
15 ret void
16}
17
18declare void @llvm.SI.export(i32, i32, i32, i32, i32, float, float, float, float)
19
20attributes #0 = { "ShaderType"="0" }
21
Tom Stellard6c7a7e82014-02-13 23:34:12 +000022; CHECK-LABEL: @i8ptr_v16i8ptr
23; CHECK: S_ENDPGM
24define void @i8ptr_v16i8ptr(<16 x i8> addrspace(1)* %out, i8 addrspace(1)* %in) {
25entry:
26 %0 = bitcast i8 addrspace(1)* %in to <16 x i8> addrspace(1)*
27 %1 = load <16 x i8> addrspace(1)* %0
28 store <16 x i8> %1, <16 x i8> addrspace(1)* %out
29 ret void
30}