blob: 1764d64c367f81c8595c12fdad499248deb5310b [file] [log] [blame]
Tom Stellard9d2e1502013-06-25 02:39:20 +00001; RUN: llc < %s -march=r600 -mcpu=redwood | FileCheck %s
2; RUN: llc < %s -march=r600 -mcpu=cayman | FileCheck %s
3
Tom Stellard79243d92014-10-01 17:15:17 +00004; CHECK: {{^}}test:
Tom Stellard9d2e1502013-06-25 02:39:20 +00005; CHECK: BIT_ALIGN_INT T{{[0-9]}}.X
6; CHECK: BIT_ALIGN_INT T{{[0-9]}}.Y
7; CHECK: BIT_ALIGN_INT T{{[0-9]}}.Z
8; CHECK: BIT_ALIGN_INT * T{{[0-9]}}.W
9
Matt Arsenault3dbeefa2017-03-21 21:39:51 +000010define amdgpu_kernel void @test(i32 addrspace(1)* %out, i32 %x_arg, i32 %y_arg, i32 %z_arg, i32 %w_arg, i32 %e) {
Tom Stellard9d2e1502013-06-25 02:39:20 +000011entry:
12 %shl = sub i32 32, %e
13 %x = add i32 %x_arg, 1
14 %x.0 = shl i32 %x, %shl
15 %x.1 = lshr i32 %x, %e
16 %x.2 = or i32 %x.0, %x.1
17 %y = add i32 %y_arg, 1
18 %y.0 = shl i32 %y, %shl
19 %y.1 = lshr i32 %y, %e
20 %y.2 = or i32 %y.0, %y.1
21 %z = add i32 %z_arg, 1
22 %z.0 = shl i32 %z, %shl
23 %z.1 = lshr i32 %z, %e
24 %z.2 = or i32 %z.0, %z.1
25 %w = add i32 %w_arg, 1
26 %w.0 = shl i32 %w, %shl
27 %w.1 = lshr i32 %w, %e
28 %w.2 = or i32 %w.0, %w.1
29 %xy = or i32 %x.2, %y.2
30 %zw = or i32 %z.2, %w.2
31 %xyzw = or i32 %xy, %zw
32 store i32 %xyzw, i32 addrspace(1)* %out
33 ret void
34}