[PATCH] D21409: Emit a swap for STXVD2X when it's emitted by matching a 'store' node

Nemanja Ivanovic via llvm-commits llvm-commits at lists.llvm.org
Mon Jun 20 11:15:46 PDT 2016


nemanjai added a comment.

In http://reviews.llvm.org/D21409#461284, @amehsan wrote:

> Just and idea, but now that you are investigating it, you may consider this. We should not have C++ code for code gen if it is possible to do things in .td files. Could we keep this patch and get rid of the code in  PPCTargetLowering::expandVSXStoreForLE() which generates PPCISD::STXVD2X  (and possibly get rid of PPCISD::STXVC2X altogether?).


Yes, I think it would be a good idea to get rid of the custom ISD nodes for LXVD2X and STXVD2X as well as the XXSWAPD node. This way we will always get a swap after the load and before the store as we did with the custom code. Furthermore, we can lower int_ppc_vsx_stxvd2x directly to the STXVD2X instruction (and conversely for the load). This will ensure that if someone uses the intrinsic through a builtin, they just get the instruction without the swap allowing us to trivially implement vec_xl_be/vec_xst_be for 64-bit data types.


Repository:
  rL LLVM

http://reviews.llvm.org/D21409





More information about the llvm-commits mailing list