[Libclc-dev] [PATCH 0/3] vload/vstore: major improvements

Aaron Watry awatry at gmail.com
Fri Jul 25 16:15:51 PDT 2014

The R600 back-end is the only one that ever used the hand-coded bitcode
versions of vload/vstore for int32 vector loads/stores. The hand-rolled
bitcode was used for data types which R600 could actually survive
instruction selection for, and the CLC implementation lowered all other
vector loads/stores to scalar loads/stores.  This necessarily generated
some sub-optimal bitcode, but at least it ran on R600.

After some mailing list discussion, this was revisited now that the R600
backend in LLVM is more mature.  Turns out that R600 can now handle all
of the load/store types that are needed in CL.

By using pointer casting, we can improve the CLC versions of the loads
and stores instead of scalarizing all of the vector loads/stores. This
gets us bitcode which is pretty much identical to the hand-written
implementation that we were using for int32 operations previously...
and it works for all types.

Since the pointer-casting CLC implementation now gives us good generated
bit-code, use that instead of the hand-rolled options and then remove
the old bitcode implementation.

This series completely replaces the previous series of 9 patches that
I had sent earlier this week.

This series has been tested on evergreen via piglit without any changes
in test success/fail/crash/skip rate.

Please review and let me know of any issues/concerns.

More information about the Libclc-dev mailing list