[Mesa-dev] R600: Expand integer operations for SI and consolidate code with EG

Aaron Watry awatry at gmail.com
Thu Jun 20 16:43:38 PDT 2013


This series is intended to bring SI closer to evergreen when it comes to
support for v2i32/v4i32 integer operations.

It adds support for expanding the following v2i32/v4i32 operations on SI:
AND, MUL, OR, SHL, SRL, ASHR, UDIV, UREM, XOR

Once that's done, the setOperationAction(op,type,Expand) calls that appear in
both R600ISelLowering.cpp and SIISelLowering.cpp are all moved to
AMDGPUISelLowering.cpp.  If we decide to implement these ops through native
instructions for either target in the future, we can override that in the
individual targets.

Signed-off-by: Aaron Watry <awatry at gmail.com>

R600/SI: Expand and of v2i32/v4i32 for SI
R600/SI: Expand mul of v2i32/v4i32 for SI
R600/SI: Expand or of v2i32/v4i32 for SI
R600/SI: Expand shl of v2i32/v4i32 for SI
R600/SI: Expand srl of v2i32/v4i32 for SI
R600/SI: Expand ashr of v2i32/v4i32 for SI
R600/SI: Expand udiv v[24]i32 for SI and v2i32 for EG
R600/SI: Expand urem of v2i32/v4i32 for SI
R600: Add v2i32 test for setcc on evergreen
R600/SI: Expand xor v2i32/v4i32
R600: Add v2i32 test for vselect
R600: Consolidate expansion of v2i32/v4i32 ops for SI/EG

 lib/Target/R600/AMDGPUISelLowering.cpp | 22 ++++++++++++++++
 lib/Target/R600/R600ISelLowering.cpp   | 18 -------------
 lib/Target/R600/SIISelLowering.cpp     |  5 ----
 test/CodeGen/R600/and.ll               | 37 +++++++++++++++++++++-----
 test/CodeGen/R600/mul.ll               | 38 ++++++++++++++++++++++-----
 test/CodeGen/R600/or.ll                | 41 ++++++++++++++++++++++++-----
 test/CodeGen/R600/setcc.ll             | 25 +++++++++++++++---
 test/CodeGen/R600/shl.ll               | 47 ++++++++++++++++++++++++++--------
 test/CodeGen/R600/sra.ll               | 41 ++++++++++++++++++++++++-----
 test/CodeGen/R600/srl.ll               | 42 +++++++++++++++++++++++++-----
 test/CodeGen/R600/udiv.ll              | 25 +++++++++++++++---
 test/CodeGen/R600/urem.ll              | 27 ++++++++++++++++---
 test/CodeGen/R600/vselect.ll           | 26 ++++++++++++++-----
 test/CodeGen/R600/xor.ll               | 40 ++++++++++++++++++++++++-----
 14 files changed, 345 insertions(+), 89 deletions(-)



More information about the mesa-dev mailing list