1 ; RUN: llc -amdgpu-scalarize-global-loads=false -march=amdgcn -verify-machineinstrs < %s | FileCheck -check-prefix=SI -check-prefix=BOTH %s
2 ; RUN: llc -amdgpu-scalarize-global-loads=false -march=amdgcn -mcpu=tonga -verify-machineinstrs < %s | FileCheck -check-prefix=VI -check-prefix=BOTH %s
4 ; BOTH-LABEL: {{^}}s_rotl_i64:
10 define amdgpu_kernel void @s_rotl_i64(i64 addrspace(1)* %in, i64 %x, i64 %y) {
16 store i64 %3, i64 addrspace(1)* %in
20 ; BOTH-LABEL: {{^}}v_rotl_i64:
22 ; VI-DAG: v_lshlrev_b64
23 ; BOTH-DAG: v_sub_{{[iu]}}32
29 define amdgpu_kernel void @v_rotl_i64(i64 addrspace(1)* %in, i64 addrspace(1)* %xptr, i64 addrspace(1)* %yptr) {
31 %x = load i64, i64 addrspace(1)* %xptr, align 8
32 %y = load i64, i64 addrspace(1)* %yptr, align 8
33 %tmp0 = shl i64 %x, %y
34 %tmp1 = sub i64 64, %y
35 %tmp2 = lshr i64 %x, %tmp1
36 %tmp3 = or i64 %tmp0, %tmp2
37 store i64 %tmp3, i64 addrspace(1)* %in, align 8