test/CodeGen/R600: Add some basic tests v6

llvm-svn: 160273
This commit is contained in:
Tom Stellard 2012-07-16 14:17:19 +00:00
parent 812e652b43
commit 6693fbe3eb
27 changed files with 212 additions and 0 deletions

View File

@ -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)

Binary file not shown.

View File

@ -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)

Binary file not shown.

View File

@ -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)

Binary file not shown.

View File

@ -0,0 +1,13 @@
config.suffixes = ['.ll', '.c', '.cpp']
def getRoot(config):
if not config.parent:
return config
return getRoot(config.parent)
root = getRoot(config)
targets = set(root.targets_to_build.split())
if not 'AMDGPU' in targets:
config.unsupported = True

View File

@ -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.AMDGPU.cos( float %r0)
call void @llvm.AMDGPU.store.output(float %r1, i32 0)
ret void
}
declare float @llvm.R600.load.input(i32) readnone
declare void @llvm.AMDGPU.store.output(float, i32)
declare float @llvm.AMDGPU.cos(float ) readnone

Binary file not shown.

View File

@ -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.AMDGPU.floor( float %r0)
call void @llvm.AMDGPU.store.output(float %r1, i32 0)
ret void
}
declare float @llvm.R600.load.input(i32) readnone
declare void @llvm.AMDGPU.store.output(float, i32)
declare float @llvm.AMDGPU.floor(float ) readnone

Binary file not shown.

View File

@ -0,0 +1,16 @@
;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 = call float @llvm.AMDGPU.mul( float %r0, float %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)
declare float @llvm.AMDGPU.mul(float ,float ) readnone

Binary file not shown.

View File

@ -0,0 +1,16 @@
;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 = call float @llvm.AMDGPU.pow( float %r0, float %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)
declare float @llvm.AMDGPU.pow(float ,float ) readnone

Binary file not shown.

View File

@ -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.AMDGPU.rcp( float %r0)
call void @llvm.AMDGPU.store.output(float %r1, i32 0)
ret void
}
declare float @llvm.R600.load.input(i32) readnone
declare void @llvm.AMDGPU.store.output(float, i32)
declare float @llvm.AMDGPU.rcp(float ) readnone

Binary file not shown.

View File

@ -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.AMDGPU.sin( float %r0)
call void @llvm.AMDGPU.store.output(float %r1, i32 0)
ret void
}
declare float @llvm.R600.load.input(i32) readnone
declare void @llvm.AMDGPU.store.output(float, i32)
declare float @llvm.AMDGPU.sin(float ) readnone

Binary file not shown.

View File

@ -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.AMDGPU.trunc( float %r0)
call void @llvm.AMDGPU.store.output(float %r1, i32 0)
ret void
}
declare float @llvm.R600.load.input(i32) readnone
declare void @llvm.AMDGPU.store.output(float, i32)
declare float @llvm.AMDGPU.trunc(float ) readnone

Binary file not shown.

View File

@ -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.AMDIL.fabs.( float %r0)
call void @llvm.AMDGPU.store.output(float %r1, i32 0)
ret void
}
declare float @llvm.R600.load.input(i32) readnone
declare void @llvm.AMDGPU.store.output(float, i32)
declare float @llvm.AMDIL.fabs.(float ) readnone

Binary file not shown.

View File

@ -0,0 +1,16 @@
;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 = call float @llvm.AMDIL.max.( float %r0, float %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)
declare float @llvm.AMDIL.max.(float ,float ) readnone

Binary file not shown.

View File

@ -0,0 +1,16 @@
;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 = call float @llvm.AMDIL.min.( float %r0, float %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)
declare float @llvm.AMDIL.min.(float ,float ) readnone

Binary file not shown.