diff options
Diffstat (limited to 'test/CodeGen')
-rw-r--r-- | test/CodeGen/R600/trunc.ll | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/test/CodeGen/R600/trunc.ll b/test/CodeGen/R600/trunc.ll index 1fbe720..be7a430 100644 --- a/test/CodeGen/R600/trunc.ll +++ b/test/CodeGen/R600/trunc.ll @@ -17,3 +17,15 @@ define void @trunc_i64_to_i32_store(i32 addrspace(1)* %out, i64 %in) { ret void } +; SI-LABEL: @trunc_shl_i64: +; SI: S_LOAD_DWORDX2 +; SI: S_LOAD_DWORDX2 [[SREG:SGPR[0-9]+_SGPR[0-9]+]] +; SI: V_LSHL_B64 [[LO_VREG:VGPR[0-9]+]]_VGPR{{[0-9]+}}, [[SREG]], 2 +; SI-NOT: [[LO_VREG]] +; SI: BUFFER_STORE_DWORD [[LO_VREG]], +define void @trunc_shl_i64(i32 addrspace(1)* %out, i64 %a) { + %b = shl i64 %a, 2 + %result = trunc i64 %b to i32 + store i32 %result, i32 addrspace(1)* %out, align 4 + ret void +} |