summaryrefslogtreecommitdiff
path: root/test/CodeGen/PTX
Commit message (Collapse)AuthorAge
* allow non-device function calls in PTX when natively handling device-side printfDan Bailey2011-11-11
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@144388 91177308-0d34-0410-b5e6-96231b3b80d8
* fixed global array handling for ptx to use the correct bit widthsDan Bailey2011-11-03
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@143640 91177308-0d34-0410-b5e6-96231b3b80d8
* Change the default scheduler from Latency to ILP, since LatencyDan Gohman2011-10-24
| | | | | | | is going away. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@142810 91177308-0d34-0410-b5e6-96231b3b80d8
* PTX: Fix disabling of MAD instruction selectionJustin Holewinski2011-10-18
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@142352 91177308-0d34-0410-b5e6-96231b3b80d8
* PTX: Add new patterns for bitconvert and any_extendJustin Holewinski2011-09-29
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@140753 91177308-0d34-0410-b5e6-96231b3b80d8
* PTX: MC-ize the PTX back-end (patch 1 of N)Justin Holewinski2011-09-28
| | | | | | | | Lay some groundwork for converting to MC-based asm printer. This is the first of probably many patches to bring the back-end back up-to-date with all of the recent MC changes. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@140697 91177308-0d34-0410-b5e6-96231b3b80d8
* PTX: Add support for sitofp in backendJustin Holewinski2011-09-27
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@140593 91177308-0d34-0410-b5e6-96231b3b80d8
* PTX: Fix detection of stack load/store vs. global load/store, as well as fix theJustin Holewinski2011-09-26
| | | | | | printing of local offsets git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@140547 91177308-0d34-0410-b5e6-96231b3b80d8
* PTX: Add .align tests to stack object test fileJustin Holewinski2011-09-26
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@140537 91177308-0d34-0410-b5e6-96231b3b80d8
* PTX: Fix some lingering issues with stack allocationJustin Holewinski2011-09-26
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@140535 91177308-0d34-0410-b5e6-96231b3b80d8
* PTX: Unify handling of loads/storesJustin Holewinski2011-09-26
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@140533 91177308-0d34-0410-b5e6-96231b3b80d8
* PTX: Handle function call return valuesJustin Holewinski2011-09-23
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@140386 91177308-0d34-0410-b5e6-96231b3b80d8
* PTX: Start fixing function callsJustin Holewinski2011-09-23
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@140378 91177308-0d34-0410-b5e6-96231b3b80d8
* PTX: fixup test cases for register changesJustin Holewinski2011-09-22
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@140311 91177308-0d34-0410-b5e6-96231b3b80d8
* PTX: Add initial support for device function callsJustin Holewinski2011-08-09
| | | | | | - Calls are supported on SM 2.0+ for function with no return values git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@137125 91177308-0d34-0410-b5e6-96231b3b80d8
* PTX: corrected tests that were failingDan Bailey2011-06-25
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@133875 91177308-0d34-0410-b5e6-96231b3b80d8
* PTX: Reverting implementation of i8.Dan Bailey2011-06-25
| | | | | | | | | | The .b8 operations in PTX are far more limiting than I first thought. The mov operation isn't even supported, so there's no way of converting a .pred value into a .b8 without going via .b16, which is not sensible. An improved implementation needs to use the fact that loads and stores automatically extend and truncate to implement support for EXTLOAD and TRUNCSTORE in order to correctly support boolean values. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@133873 91177308-0d34-0410-b5e6-96231b3b80d8
* PTX: Add support for i8 type and introduce associated .b8 registersDan Bailey2011-06-24
| | | | | | | | The i8 type is required for boolean values, but can only use ld, st and mov instructions. The i1 type continues to be used for predicates. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@133814 91177308-0d34-0410-b5e6-96231b3b80d8
* PTX: Always use registers for return values, but use .param space for deviceJustin Holewinski2011-06-23
| | | | | | | | | | | parameters if SM >= 2.0 - Update test cases to be more robust against register allocation changes - Bump up the number of registers to 128 per type - Include Python script to re-generate register file with any number of registers git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@133736 91177308-0d34-0410-b5e6-96231b3b80d8
* PTX: Fixup test cases for device param changesJustin Holewinski2011-06-23
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@133735 91177308-0d34-0410-b5e6-96231b3b80d8
* PTX: Add signed integer comparisonsJustin Holewinski2011-06-22
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@133599 91177308-0d34-0410-b5e6-96231b3b80d8
* PTX: Add .address_size directive if PTX version >= 2.3Justin Holewinski2011-06-22
| | | | | | Patch by Wei-Ren Chen git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@133589 91177308-0d34-0410-b5e6-96231b3b80d8
* PTX: Fix conversion between predicates and value typesJustin Holewinski2011-06-20
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@133454 91177308-0d34-0410-b5e6-96231b3b80d8
* PTX: Adjust rounding modesJustin Holewinski2011-06-17
| | | | | | | | | | | | | | | * rounding modes for fp add, mul, sub now use .rn * float -> int rounding correctly uses .rzi not .rni * 32bit fdiv for sm13 uses div.rn (instead of div.approx) * 32bit fdiv for sm10 now uses div (instead of div.approx) Approx is not IEEE 754 compatible (and should be optionally set by a flag to the backend instead). The .rn rounding modifier is the PTX default anyway, but it's better to be explicit. All these modifiers should be available by using __fmul_rz functions for example, but support will need to be added for this in the backend. Patch by Dan Bailey git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@133253 91177308-0d34-0410-b5e6-96231b3b80d8
* PTX: Finish new calling convention implementationJustin Holewinski2011-06-16
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@133172 91177308-0d34-0410-b5e6-96231b3b80d8
* PTX: add flag to disable mad/fma selectionJustin Holewinski2011-05-18
| | | | | | Patch by Dan Bailey git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@131537 91177308-0d34-0410-b5e6-96231b3b80d8
* PTX: add test cases for cvt, fneg, and selpJustin Holewinski2011-05-10
| | | | | | Patch by Dan Bailey git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@131128 91177308-0d34-0410-b5e6-96231b3b80d8
* PTX: add PTX 2.3 language targetJustin Holewinski2011-05-06
| | | | | | Patch by Wei-Ren Chen git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@130980 91177308-0d34-0410-b5e6-96231b3b80d8
* PTX: support for bitwise operations on predicatesJustin Holewinski2011-04-28
| | | | | | | | | - selection of bitwise preds (AND, OR, XOR) - new bitwise.ll test Patch by Dan Bailey git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@130353 91177308-0d34-0410-b5e6-96231b3b80d8
* Make tests more useful.Benjamin Kramer2011-04-25
| | | | | | lit needs a linter ... git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@130126 91177308-0d34-0410-b5e6-96231b3b80d8
* ptx: fix parameter orderingChe-Liang Chiou2011-04-21
| | | | | | | | | | This patch depends on the prior fix r129908 that changes to use std::find, rather than std::binary_search, on unordered array. Patch by Dan Bailey git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@129909 91177308-0d34-0410-b5e6-96231b3b80d8
* PTX: Add intrinsics to list of built-in intrinsics, which allows them to beJustin Holewinski2011-04-20
| | | | | | | | | | used by Clang. To help Clang integration, the PTX target has been split into two targets: ptx32 and ptx64, depending on the desired pointer size. - Add GCCBuiltin class to all intrinsics - Split PTX target into ptx32 and ptx64 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@129851 91177308-0d34-0410-b5e6-96231b3b80d8
* ptx: support setp's 4-operand formatChe-Liang Chiou2011-04-02
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@128767 91177308-0d34-0410-b5e6-96231b3b80d8
* ptx: add analyze/insert/remove branchChe-Liang Chiou2011-03-22
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@128084 91177308-0d34-0410-b5e6-96231b3b80d8
* PTX: Fix various codegen issuesJustin Holewinski2011-03-18
| | | | | | | | - Emit mad instead of mad.rn for shader model 1.0 - Emit explicit mov.u32 instructions for reading global variables - (most PTX instructions cannot take global variable immediates) git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@127895 91177308-0d34-0410-b5e6-96231b3b80d8
* ptx: fix parameter order that is reversedChe-Liang Chiou2011-03-18
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@127874 91177308-0d34-0410-b5e6-96231b3b80d8
* ptx: add unconditional and conditional branchChe-Liang Chiou2011-03-18
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@127873 91177308-0d34-0410-b5e6-96231b3b80d8
* PTX: Set PTX 2.0 as the minimum supported versionJustin Holewinski2011-03-15
| | | | | | | | - Remove PTX 1.4 code generation - Change type of intrinsics to .v4.i32 instead of .v4.i16 - Add and/or/xor integer instructions git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@127677 91177308-0d34-0410-b5e6-96231b3b80d8
* PTX: Emit global arrays with proper sizesJustin Holewinski2011-03-14
| | | | | | | - Emit all arrays as type .b8 and proper sizes in bytes to conform to the output of nvcc git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@127584 91177308-0d34-0410-b5e6-96231b3b80d8
* PTX: Add support for sqrt/sin/cos intrinsicsJustin Holewinski2011-03-14
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@127578 91177308-0d34-0410-b5e6-96231b3b80d8
* ptx: add set.p instruction and related changes to predicate executionChe-Liang Chiou2011-03-14
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@127577 91177308-0d34-0410-b5e6-96231b3b80d8
* PTX: Add preliminary support for floating-point divide and multiply-and-addJustin Holewinski2011-03-10
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@127410 91177308-0d34-0410-b5e6-96231b3b80d8
* ptx: add the rest of special registers of ISA version 2.0Che-Liang Chiou2011-03-10
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@127397 91177308-0d34-0410-b5e6-96231b3b80d8
* PTX: Add intrinsic support for ntid, ctaid, and nctaid registersJustin Holewinski2011-03-08
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@127246 91177308-0d34-0410-b5e6-96231b3b80d8
* ptx: add basic intrinsic supportChe-Liang Chiou2011-03-05
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@127084 91177308-0d34-0410-b5e6-96231b3b80d8
* Extend initial support for primitive types in PTX backendChe-Liang Chiou2011-03-02
| | | | | | | | | | | | | | | | - Allow i16, i32, i64, float, and double types, using the native .u16, .u32, .u64, .f32, and .f64 PTX types. - Allow loading/storing of all primitive types. - Allow primitive types to be passed as parameters. - Allow selection of PTX Version and Shader Model as sub-target attributes. - Merge integer/floating-point test cases for load/store. - Use .u32 instead of .s32 to conform to output from NVidia nvcc compiler. Patch by Justin Holewinski git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@126824 91177308-0d34-0410-b5e6-96231b3b80d8
* Add preliminary support for .f32 in the PTX backend.Che-Liang Chiou2011-02-28
| | | | | | | | | | | | | | - Add appropriate TableGen patterns for fadd, fsub, fmul. - Add .f32 as the PTX type for the LLVM float type. - Allow parameters, return values, and global variable declarations to accept the float type. - Add appropriate test cases. Patch by Justin Holewinski git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@126636 91177308-0d34-0410-b5e6-96231b3b80d8
* ptx: add passing parameter to kernel functionsChe-Liang Chiou2011-02-10
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@125279 91177308-0d34-0410-b5e6-96231b3b80d8
* ptx: remove reg-reg addressing mode and st.constChe-Liang Chiou2011-01-01
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@122653 91177308-0d34-0410-b5e6-96231b3b80d8
* ptx: add store instructionChe-Liang Chiou2011-01-01
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@122652 91177308-0d34-0410-b5e6-96231b3b80d8