From 2015236dfcd40f0b93e7d9f6dc4c380dc88bf3c0 Mon Sep 17 00:00:00 2001 From: Tom Stellard Date: Mon, 16 Jul 2012 14:17:19 +0000 Subject: [PATCH] test/CodeGen/R600: Add some basic tests v6 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@160273 91177308-0d34-0410-b5e6-96231b3b80d8 --- test/CodeGen/R600/fadd.ll | 15 +++++++++++++++ test/CodeGen/R600/fadd.ll.check | Bin 0 -> 48 bytes test/CodeGen/R600/fmul.ll | 15 +++++++++++++++ test/CodeGen/R600/fmul.ll.check | Bin 0 -> 48 bytes test/CodeGen/R600/fsub.ll | 15 +++++++++++++++ test/CodeGen/R600/fsub.ll.check | Bin 0 -> 96 bytes test/CodeGen/R600/lit.local.cfg | 13 +++++++++++++ test/CodeGen/R600/llvm.AMDGPU.cos.ll | 15 +++++++++++++++ test/CodeGen/R600/llvm.AMDGPU.cos.ll.check | Bin 0 -> 144 bytes test/CodeGen/R600/llvm.AMDGPU.floor.ll | 15 +++++++++++++++ test/CodeGen/R600/llvm.AMDGPU.floor.ll.check | Bin 0 -> 48 bytes test/CodeGen/R600/llvm.AMDGPU.mul.ll | 16 ++++++++++++++++ test/CodeGen/R600/llvm.AMDGPU.mul.ll.check | Bin 0 -> 48 bytes test/CodeGen/R600/llvm.AMDGPU.pow.ll | 16 ++++++++++++++++ test/CodeGen/R600/llvm.AMDGPU.pow.ll.check | Bin 0 -> 144 bytes test/CodeGen/R600/llvm.AMDGPU.rcp.ll | 15 +++++++++++++++ test/CodeGen/R600/llvm.AMDGPU.rcp.ll.check | Bin 0 -> 48 bytes test/CodeGen/R600/llvm.AMDGPU.sin.ll | 15 +++++++++++++++ test/CodeGen/R600/llvm.AMDGPU.sin.ll.check | Bin 0 -> 144 bytes test/CodeGen/R600/llvm.AMDGPU.trunc.ll | 15 +++++++++++++++ test/CodeGen/R600/llvm.AMDGPU.trunc.ll.check | Bin 0 -> 48 bytes test/CodeGen/R600/llvm.AMDIL.fabs..ll | 15 +++++++++++++++ test/CodeGen/R600/llvm.AMDIL.fabs..ll.check | Bin 0 -> 48 bytes test/CodeGen/R600/llvm.AMDIL.max..ll | 16 ++++++++++++++++ test/CodeGen/R600/llvm.AMDIL.max..ll.check | Bin 0 -> 48 bytes test/CodeGen/R600/llvm.AMDIL.min..ll | 16 ++++++++++++++++ test/CodeGen/R600/llvm.AMDIL.min..ll.check | Bin 0 -> 48 bytes 27 files changed, 212 insertions(+) create mode 100644 test/CodeGen/R600/fadd.ll create mode 100644 test/CodeGen/R600/fadd.ll.check create mode 100644 test/CodeGen/R600/fmul.ll create mode 100644 test/CodeGen/R600/fmul.ll.check create mode 100644 test/CodeGen/R600/fsub.ll create mode 100644 test/CodeGen/R600/fsub.ll.check create mode 100644 test/CodeGen/R600/lit.local.cfg create mode 100644 test/CodeGen/R600/llvm.AMDGPU.cos.ll create mode 100644 test/CodeGen/R600/llvm.AMDGPU.cos.ll.check create mode 100644 test/CodeGen/R600/llvm.AMDGPU.floor.ll create mode 100644 test/CodeGen/R600/llvm.AMDGPU.floor.ll.check create mode 100644 test/CodeGen/R600/llvm.AMDGPU.mul.ll create mode 100644 test/CodeGen/R600/llvm.AMDGPU.mul.ll.check create mode 100644 test/CodeGen/R600/llvm.AMDGPU.pow.ll create mode 100644 test/CodeGen/R600/llvm.AMDGPU.pow.ll.check create mode 100644 test/CodeGen/R600/llvm.AMDGPU.rcp.ll create mode 100644 test/CodeGen/R600/llvm.AMDGPU.rcp.ll.check create mode 100644 test/CodeGen/R600/llvm.AMDGPU.sin.ll create mode 100644 test/CodeGen/R600/llvm.AMDGPU.sin.ll.check create mode 100644 test/CodeGen/R600/llvm.AMDGPU.trunc.ll create mode 100644 test/CodeGen/R600/llvm.AMDGPU.trunc.ll.check create mode 100644 test/CodeGen/R600/llvm.AMDIL.fabs..ll create mode 100644 test/CodeGen/R600/llvm.AMDIL.fabs..ll.check create mode 100644 test/CodeGen/R600/llvm.AMDIL.max..ll create mode 100644 test/CodeGen/R600/llvm.AMDIL.max..ll.check create mode 100644 test/CodeGen/R600/llvm.AMDIL.min..ll create mode 100644 test/CodeGen/R600/llvm.AMDIL.min..ll.check diff --git a/test/CodeGen/R600/fadd.ll b/test/CodeGen/R600/fadd.ll new file mode 100644 index 00000000000..874fcc6f43e --- /dev/null +++ b/test/CodeGen/R600/fadd.ll @@ -0,0 +1,15 @@ +;RUN: llc < %s -march=r600 -mcpu=redwood | diff %s.check - + + +define void @test() { + %r0 = call float @llvm.R600.load.input(i32 0) + %r1 = call float @llvm.R600.load.input(i32 1) + %r2 = fadd float %r0, %r1 + call void @llvm.AMDGPU.store.output(float %r2, i32 0) + ret void +} + +declare float @llvm.R600.load.input(i32) readnone + +declare void @llvm.AMDGPU.store.output(float, i32) + diff --git a/test/CodeGen/R600/fadd.ll.check b/test/CodeGen/R600/fadd.ll.check new file mode 100644 index 0000000000000000000000000000000000000000..886082f22622bf687d2a9c53214873c3691f7620 GIT binary patch literal 48 TcmZQzKn9G+90VIA43z=^0Av6J literal 0 HcmV?d00001 diff --git a/test/CodeGen/R600/fmul.ll b/test/CodeGen/R600/fmul.ll new file mode 100644 index 00000000000..28bc4d8008e --- /dev/null +++ b/test/CodeGen/R600/fmul.ll @@ -0,0 +1,15 @@ +;RUN: llc < %s -march=r600 -mcpu=redwood | diff %s.check - + + +define void @test() { + %r0 = call float @llvm.R600.load.input(i32 0) + %r1 = call float @llvm.R600.load.input(i32 1) + %r2 = fmul float %r0, %r1 + call void @llvm.AMDGPU.store.output(float %r2, i32 0) + ret void +} + +declare float @llvm.R600.load.input(i32) readnone + +declare void @llvm.AMDGPU.store.output(float, i32) + diff --git a/test/CodeGen/R600/fmul.ll.check b/test/CodeGen/R600/fmul.ll.check new file mode 100644 index 0000000000000000000000000000000000000000..9ba36ccb7416ea5886d596684ff4bf8bc3759d07 GIT binary patch literal 48 VcmZQzKn9G+90Z$@fr$Ys1pokc00sa6 literal 0 HcmV?d00001 diff --git a/test/CodeGen/R600/fsub.ll b/test/CodeGen/R600/fsub.ll new file mode 100644 index 00000000000..8e431280fca --- /dev/null +++ b/test/CodeGen/R600/fsub.ll @@ -0,0 +1,15 @@ +;RUN: llc < %s -march=r600 -mcpu=redwood | diff %s.check - + + +define void @test() { + %r0 = call float @llvm.R600.load.input(i32 0) + %r1 = call float @llvm.R600.load.input(i32 1) + %r2 = fsub float %r0, %r1 + call void @llvm.AMDGPU.store.output(float %r2, i32 0) + ret void +} + +declare float @llvm.R600.load.input(i32) readnone + +declare void @llvm.AMDGPU.store.output(float, i32) + diff --git a/test/CodeGen/R600/fsub.ll.check b/test/CodeGen/R600/fsub.ll.check new file mode 100644 index 0000000000000000000000000000000000000000..79993541ce6ba84501876e488bfd428501f1383f GIT binary patch literal 96 fcmZQzU|?iqzzY}|7#Spi7z@BE2s9C>6e