R600/SI: Relax some ordering in tests.
[oota-llvm.git] / test / CodeGen / R600 / rotl.i64.ll
1 ; RUN: llc -march=r600 -mcpu=SI -verify-machineinstrs < %s | FileCheck -check-prefix=SI -check-prefix=FUNC %s
2
3 ; FUNC-LABEL: @s_rotl_i64:
4 ; SI-DAG: S_LSHL_B64
5 ; SI-DAG: S_SUB_I32
6 ; SI-DAG: S_LSHR_B64
7 ; SI: S_OR_B64
8 ; SI: S_ENDPGM
9 define void @s_rotl_i64(i64 addrspace(1)* %in, i64 %x, i64 %y) {
10 entry:
11   %0 = shl i64 %x, %y
12   %1 = sub i64 64, %y
13   %2 = lshr i64 %x, %1
14   %3 = or i64 %0, %2
15   store i64 %3, i64 addrspace(1)* %in
16   ret void
17 }
18
19 ; FUNC-LABEL: @v_rotl_i64:
20 ; SI-DAG: V_LSHL_B64
21 ; SI-DAG: V_SUB_I32
22 ; SI: V_LSHR_B64
23 ; SI: V_OR_B32
24 ; SI: V_OR_B32
25 ; SI: S_ENDPGM
26 define void @v_rotl_i64(i64 addrspace(1)* %in, i64 addrspace(1)* %xptr, i64 addrspace(1)* %yptr) {
27 entry:
28   %x = load i64 addrspace(1)* %xptr, align 8
29   %y = load i64 addrspace(1)* %yptr, align 8
30   %tmp0 = shl i64 %x, %y
31   %tmp1 = sub i64 64, %y
32   %tmp2 = lshr i64 %x, %tmp1
33   %tmp3 = or i64 %tmp0, %tmp2
34   store i64 %tmp3, i64 addrspace(1)* %in, align 8
35   ret void
36 }