forked from llvm-mirror/llvm
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
R600: Reorganize lit tests and document how they should be organized
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@179828 91177308-0d34-0410-b5e6-96231b3b80d8
- Loading branch information
1 parent
9affd16
commit 3abd23b
Showing
29 changed files
with
174 additions
and
128 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
+==============================================================================+ | ||
| How to organize the lit tests | | ||
+==============================================================================+ | ||
|
||
- If you write a test for matching a single DAG opcode or intrinsic, it should | ||
go in a file called {opcode_name,intrinsic_name}.ll (e.g. fadd.ll) | ||
|
||
- If you write a test that matches several DAG opcodes and checks for a single | ||
ISA instruction, then that test should go in a file called {ISA_name}.ll (e.g. | ||
bfi_int.ll | ||
|
||
- For all other tests, use your best judgement for organizing tests and naming | ||
the files. | ||
|
||
+==============================================================================+ | ||
| Naming conventions | | ||
+==============================================================================+ | ||
|
||
- Use dash '-' and not underscore '_' to separate words in file names, unless | ||
the file is named after a DAG opcode or ISA instruction that has an | ||
underscore '_' in its name. |
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
; RUN: llc < %s -march=r600 -mcpu=redwood | FileCheck %s | ||
|
||
; CHECK: @fp_to_sint_v4i32 | ||
; CHECK: FLT_TO_INT T{{[0-9]+\.[XYZW], T[0-9]+\.[XYZW]}} | ||
; CHECK: FLT_TO_INT T{{[0-9]+\.[XYZW], T[0-9]+\.[XYZW]}} | ||
; CHECK: FLT_TO_INT T{{[0-9]+\.[XYZW], T[0-9]+\.[XYZW]}} | ||
; CHECK: FLT_TO_INT T{{[0-9]+\.[XYZW], T[0-9]+\.[XYZW]}} | ||
|
||
define void @fp_to_sint_v4i32(<4 x i32> addrspace(1)* %out, <4 x float> addrspace(1)* %in) { | ||
%value = load <4 x float> addrspace(1) * %in | ||
%result = fptosi <4 x float> %value to <4 x i32> | ||
store <4 x i32> %result, <4 x i32> addrspace(1)* %out | ||
ret void | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
; RUN: llc < %s -march=r600 -mcpu=redwood | FileCheck %s | ||
|
||
; CHECK: @fp_to_uint_v4i32 | ||
; CHECK: FLT_TO_UINT T{{[0-9]+\.[XYZW], T[0-9]+\.[XYZW]}} | ||
; CHECK: FLT_TO_UINT T{{[0-9]+\.[XYZW], T[0-9]+\.[XYZW]}} | ||
; CHECK: FLT_TO_UINT T{{[0-9]+\.[XYZW], T[0-9]+\.[XYZW]}} | ||
; CHECK: FLT_TO_UINT T{{[0-9]+\.[XYZW], T[0-9]+\.[XYZW]}} | ||
|
||
define void @fp_to_uint_v4i32(<4 x i32> addrspace(1)* %out, <4 x float> addrspace(1)* %in) { | ||
%value = load <4 x float> addrspace(1) * %in | ||
%result = fptoui <4 x float> %value to <4 x i32> | ||
store <4 x i32> %result, <4 x i32> addrspace(1)* %out | ||
ret void | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
File renamed without changes.
File renamed without changes.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
; RUN: llc < %s -march=r600 -mcpu=redwood | FileCheck %s | ||
|
||
; Load an i8 value from the global address space. | ||
; CHECK: VTX_READ_8 T{{[0-9]+\.X, T[0-9]+\.X}} | ||
|
||
define void @load_i8(i32 addrspace(1)* %out, i8 addrspace(1)* %in) { | ||
%1 = load i8 addrspace(1)* %in | ||
%2 = zext i8 %1 to i32 | ||
store i32 %2, i32 addrspace(1)* %out | ||
ret void | ||
} | ||
|
||
; Load a f32 value from the constant address space. | ||
; CHECK: VTX_READ_32 T{{[0-9]+\.X, T[0-9]+\.X}} | ||
|
||
define void @load_const_addrspace_f32(float addrspace(1)* %out, float addrspace(2)* %in) { | ||
%1 = load float addrspace(2)* %in | ||
store float %1, float addrspace(1)* %out | ||
ret void | ||
} |
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
; RUN: llc < %s -march=r600 -mcpu=redwood | FileCheck %s | ||
|
||
; CHECK: @sint_to_fp_v4i32 | ||
; CHECK: INT_TO_FLT T{{[0-9]+\.[XYZW], T[0-9]+\.[XYZW]}} | ||
; CHECK: INT_TO_FLT T{{[0-9]+\.[XYZW], T[0-9]+\.[XYZW]}} | ||
; CHECK: INT_TO_FLT T{{[0-9]+\.[XYZW], T[0-9]+\.[XYZW]}} | ||
; CHECK: INT_TO_FLT T{{[0-9]+\.[XYZW], T[0-9]+\.[XYZW]}} | ||
|
||
define void @sint_to_fp_v4i32(<4 x float> addrspace(1)* %out, <4 x i32> addrspace(1)* %in) { | ||
%value = load <4 x i32> addrspace(1) * %in | ||
%result = sitofp <4 x i32> %value to <4 x float> | ||
store <4 x float> %result, <4 x float> addrspace(1)* %out | ||
ret void | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,13 @@ | ||
; RUN: llc < %s -march=r600 -mcpu=redwood | FileCheck --check-prefix=EG-CHECK %s | ||
; RUN: llc < %s -march=r600 -mcpu=verde | FileCheck --check-prefix=SI-CHECK %s | ||
|
||
; CHECK: @store_float | ||
; floating-point store | ||
; EG-CHECK: @store_f32 | ||
; EG-CHECK: RAT_WRITE_CACHELESS_32_eg T{{[0-9]+\.X, T[0-9]+\.X}}, 1 | ||
; SI-CHECK: @store_f32 | ||
; SI-CHECK: BUFFER_STORE_DWORD | ||
|
||
define void @store_float(float addrspace(1)* %out, float %in) { | ||
define void @store_f32(float addrspace(1)* %out, float %in) { | ||
store float %in, float addrspace(1)* %out | ||
ret void | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
; RUN: llc < %s -march=r600 -mcpu=redwood | FileCheck --check-prefix=EG-CHECK %s | ||
|
||
; XXX: Merge this test into store.ll once it is supported on SI | ||
|
||
; v4i32 store | ||
; EG-CHECK: @store_v4i32 | ||
; EG-CHECK: RAT_WRITE_CACHELESS_128 T{{[0-9]+\.XYZW, T[0-9]+\.X}}, 1 | ||
|
||
define void @store_v4i32(<4 x i32> addrspace(1)* %out, <4 x i32> addrspace(1)* %in) { | ||
%1 = load <4 x i32> addrspace(1) * %in | ||
store <4 x i32> %1, <4 x i32> addrspace(1)* %out | ||
ret void | ||
} | ||
|
||
; v4f32 store | ||
; EG-CHECK: @store_v4f32 | ||
; EG-CHECK: RAT_WRITE_CACHELESS_128 T{{[0-9]+\.XYZW, T[0-9]+\.X}}, 1 | ||
define void @store_v4f32(<4 x float> addrspace(1)* %out, <4 x float> addrspace(1)* %in) { | ||
%1 = load <4 x float> addrspace(1) * %in | ||
store <4 x float> %1, <4 x float> addrspace(1)* %out | ||
ret void | ||
} |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
; RUN: llc < %s -march=r600 -mcpu=redwood | FileCheck %s | ||
|
||
; CHECK: @uint_to_fp_v4i32 | ||
; CHECK: UINT_TO_FLT T{{[0-9]+\.[XYZW], T[0-9]+\.[XYZW]}} | ||
; CHECK: UINT_TO_FLT T{{[0-9]+\.[XYZW], T[0-9]+\.[XYZW]}} | ||
; CHECK: UINT_TO_FLT T{{[0-9]+\.[XYZW], T[0-9]+\.[XYZW]}} | ||
; CHECK: UINT_TO_FLT T{{[0-9]+\.[XYZW], T[0-9]+\.[XYZW]}} | ||
|
||
define void @uint_to_fp_v4i32(<4 x float> addrspace(1)* %out, <4 x i32> addrspace(1)* %in) { | ||
%value = load <4 x i32> addrspace(1) * %in | ||
%result = uitofp <4 x i32> %value to <4 x float> | ||
store <4 x float> %result, <4 x float> addrspace(1)* %out | ||
ret void | ||
} |
File renamed without changes.
This file was deleted.
Oops, something went wrong.