gallivm: Add byte-swap construct calls
authorAdhemerval Zanella <azanella@linux.vnet.ibm.com>
Thu, 22 Nov 2012 18:23:23 +0000 (12:23 -0600)
committerJosé Fonseca <jfonseca@vmware.com>
Thu, 29 Nov 2012 11:54:14 +0000 (11:54 +0000)
commitb772d784b25771ff939e3c0c87fdf0d8053827be
tree4a20dc8403f1959e5a0e235b6b0d0aa825b10262
parent86902b513469635bb0bc027db0500e2f4d6c498d
gallivm: Add byte-swap construct calls

This patch adds two more functions in type conversions header:
* lp_build_bswap: construct a call to llvm.bswap intrinsic for an
  element
* lp_build_bswap_vec: byte swap every element in a vector base on the
  input and output types.

Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Reviewed-by: Jose Fonseca <jfonseca@vmware.com>
src/gallium/auxiliary/gallivm/lp_bld_conv.c
src/gallium/auxiliary/gallivm/lp_bld_conv.h