[Mesa-dev] R600 Patchset: Optimizations for bfgminer

Aaron Watry awatry at gmail.com
Mon Apr 29 18:46:41 PDT 2013


Hi Tom,

I'm not too qualified to review the llvm code changes, but the changes
looked sane. I did want to point out a few piglit changes/regressions as a
result of this set of patches.

For my HD6850, running latest llvm from git:
gegl-rgb-gamma-u8-to-ragabaf: pass -> fail
v3i32-stack: pass -> fail
v3i32-stack-array(All Tests): skip -> fail

Dumps attached for each of these tests using the following environment var:
R600_DEBUG=cs,compute

Also, I did a make check in llvm, and test/CodeGen/R600/setcc.ll failed
with the following... I also had this same error for the CL abs(int2)
builtin, but that test had previously already been failing, so I haven't
included it above.  I'm assuming that we just need to expand ISD::SRA (just
as we expand v2i32/v4i32 for SHL and SRL).



FAIL: LLVM :: CodeGen/R600/setcc.ll (2104 of 7693)
******************** TEST 'LLVM :: CodeGen/R600/setcc.ll' FAILED
********************
Script:
--
/home/awatry/src/llvm-build/Debug+Asserts/bin/llc <
/home/awatry/src/llvm/test/CodeGen/R600/setcc.ll -march=r600 -mcpu=redwood
| /home/awatry/src/llvm-build/Debug+Asserts/bin/FileCheck
/home/awatry/src/llvm/test/CodeGen/R600/setcc.ll
--
Exit Code: 2
Command Output (stderr):
--
LLVM ERROR: Cannot select: 0x20dce30: v2i32 = sra 0x20dd310, 0x20dcc30
[ID=26]
  0x20dd310: v2i32 = BUILD_VECTOR 0x20dcf30, 0x20dd210 [ID=25]
    0x20dcf30: i32 = shl 0x20dc830, 0x20dcb30 [ID=24]
      0x20dc830: i32 = select_cc 0x20d9d60, 0x20dc130, 0x20dc330,
0x20d9c60, 0x20d9b60 [ID=22]
        0x20d9d60: i32 = extract_vector_elt 0x20d9860, 0x20d9c60 [ID=17]
          0x20d9860: v2i32,ch = load 0x20a7828, 0x20d9760,
0x20d9560<LD8[undef]> [ORD=1] [ID=12]
            0x20d9760: i32 = Constant<40> [ORD=1] [ID=3]
            0x20d9560: i32 = undef [ORD=1] [ID=2]
          0x20d9c60: i32 = Constant<0> [ID=6]
        0x20dc130: i32 = extract_vector_elt 0x20d9a60, 0x20d9c60 [ID=19]
          0x20d9a60: v2i32,ch = load 0x20a7828, 0x20d9960,
0x20d9560<LD8[undef]> [ORD=1] [ID=13]
            0x20d9960: i32 = Constant<48> [ORD=1] [ID=4]
            0x20d9560: i32 = undef [ORD=1] [ID=2]
          0x20d9c60: i32 = Constant<0> [ID=6]
        0x20dc330: i32 = Constant<-1> [ID=7]
        0x20d9c60: i32 = Constant<0> [ID=6]
      0x20dcb30: i32 = Constant<31> [ID=9]
    0x20dd210: i32 = shl 0x20d9e60, 0x20dcb30 [ID=23]
      0x20d9e60: i32 = select_cc 0x20dc630, 0x20dc730, 0x20dc330,
0x20d9c60, 0x20d9b60 [ID=21]
        0x20dc630: i32 = extract_vector_elt 0x20d9860, 0x20dc530 [ID=16]
          0x20d9860: v2i32,ch = load 0x20a7828, 0x20d9760,
0x20d9560<LD8[undef]> [ORD=1] [ID=12]
            0x20d9760: i32 = Constant<40> [ORD=1] [ID=3]
            0x20d9560: i32 = undef [ORD=1] [ID=2]
          0x20dc530: i32 = Constant<1> [ID=8]
        0x20dc730: i32 = extract_vector_elt 0x20d9a60, 0x20dc530 [ID=18]
          0x20d9a60: v2i32,ch = load 0x20a7828, 0x20d9960,
0x20d9560<LD8[undef]> [ORD=1] [ID=13]
            0x20d9960: i32 = Constant<48> [ORD=1] [ID=4]
            0x20d9560: i32 = undef [ORD=1] [ID=2]
          0x20dc530: i32 = Constant<1> [ID=8]
        0x20dc330: i32 = Constant<-1> [ID=7]
        0x20d9c60: i32 = Constant<0> [ID=6]
      0x20dcb30: i32 = Constant<31> [ID=9]
  0x20dcc30: v2i32 = BUILD_VECTOR 0x20dcb30, 0x20dcb30 [ID=14]
    0x20dcb30: i32 = Constant<31> [ID=9]
    0x20dcb30: i32 = Constant<31> [ID=9]
In function: setcc_v2i32
FileCheck error: '-' is empty.
--

********************
Testing Time: 48.76s
********************
Failing Tests (1):
    LLVM :: CodeGen/R600/setcc.ll

  Expected Passes    : 5543
  Expected Failures  : 29
  Unsupported Tests  : 2120
  Unexpected Failures: 1
make[1]: *** [check-local] Error 1
make[1]: Leaving directory `/home/awatry/src/llvm-build/test'
make: *** [check] Error 2



--Aaron





On Mon, Apr 29, 2013 at 3:24 PM, Tom Stellard <tom at stellard.net> wrote:

> Hi,
>
> The attached patchset implements a few optimizations for the bfgminer
> bitcoin mining program.
>
> Please Review.
>
> -Tom
>
> _______________________________________________
> mesa-dev mailing list
> mesa-dev at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/mesa-dev
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/mesa-dev/attachments/20130429/6989bc21/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: gegl-rgb-gamma-u8-to-ragabaf.cl.dump
Type: application/octet-stream
Size: 11493 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/mesa-dev/attachments/20130429/6989bc21/attachment-0003.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: v3i32-stack.cl.dump
Type: application/octet-stream
Size: 3348 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/mesa-dev/attachments/20130429/6989bc21/attachment-0004.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: v3i32-stack-array.cl.dump
Type: application/octet-stream
Size: 4844 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/mesa-dev/attachments/20130429/6989bc21/attachment-0005.obj>


More information about the mesa-dev mailing list