From 50c3bc9956b4496856dab8cf3f221b433072931f Mon Sep 17 00:00:00 2001 From: Matt Arsenault Date: Wed, 21 Jan 2015 22:43:19 +0000 Subject: [PATCH] R600: Add missing tests for i64 srem git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@226713 91177308-0d34-0410-b5e6-96231b3b80d8 --- test/CodeGen/R600/srem.ll | 48 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 48 insertions(+) diff --git a/test/CodeGen/R600/srem.ll b/test/CodeGen/R600/srem.ll index 759c8b4ef72..e9156b16481 100644 --- a/test/CodeGen/R600/srem.ll +++ b/test/CodeGen/R600/srem.ll @@ -48,3 +48,51 @@ define void @srem_v4i32_4(<4 x i32> addrspace(1)* %out, <4 x i32> addrspace(1)* store <4 x i32> %result, <4 x i32> addrspace(1)* %out ret void } + +define void @srem_i64(i64 addrspace(1)* %out, i64 addrspace(1)* %in) { + %den_ptr = getelementptr i64 addrspace(1)* %in, i64 1 + %num = load i64 addrspace(1) * %in + %den = load i64 addrspace(1) * %den_ptr + %result = srem i64 %num, %den + store i64 %result, i64 addrspace(1)* %out + ret void +} + +define void @srem_i64_4(i64 addrspace(1)* %out, i64 addrspace(1)* %in) { + %num = load i64 addrspace(1) * %in + %result = srem i64 %num, 4 + store i64 %result, i64 addrspace(1)* %out + ret void +} + +define void @srem_v2i64(<2 x i64> addrspace(1)* %out, <2 x i64> addrspace(1)* %in) { + %den_ptr = getelementptr <2 x i64> addrspace(1)* %in, i64 1 + %num = load <2 x i64> addrspace(1) * %in + %den = load <2 x i64> addrspace(1) * %den_ptr + %result = srem <2 x i64> %num, %den + store <2 x i64> %result, <2 x i64> addrspace(1)* %out + ret void +} + +define void @srem_v2i64_4(<2 x i64> addrspace(1)* %out, <2 x i64> addrspace(1)* %in) { + %num = load <2 x i64> addrspace(1) * %in + %result = srem <2 x i64> %num, + store <2 x i64> %result, <2 x i64> addrspace(1)* %out + ret void +} + +define void @srem_v4i64(<4 x i64> addrspace(1)* %out, <4 x i64> addrspace(1)* %in) { + %den_ptr = getelementptr <4 x i64> addrspace(1)* %in, i64 1 + %num = load <4 x i64> addrspace(1) * %in + %den = load <4 x i64> addrspace(1) * %den_ptr + %result = srem <4 x i64> %num, %den + store <4 x i64> %result, <4 x i64> addrspace(1)* %out + ret void +} + +define void @srem_v4i64_4(<4 x i64> addrspace(1)* %out, <4 x i64> addrspace(1)* %in) { + %num = load <4 x i64> addrspace(1) * %in + %result = srem <4 x i64> %num, + store <4 x i64> %result, <4 x i64> addrspace(1)* %out + ret void +}