[PATCH] [CodeGen] Combine shuffle from concat+bitcast scalar to avoid the smaller vector type.

Simon Pilgrim llvm-dev at redking.me.uk
Wed Apr 8 14:09:37 PDT 2015


In http://reviews.llvm.org/D8884#153312, @ab wrote:

> Yes, but there's other combines that can get in the way.  For instance, my go-to example is the _dup testcase, which we'll try to turn into just (concat_vectors (bitcast (i16)), (bitcast (i16)), ...), which, when promoted, gets scalarized, and we never recover from that.  On X86 we do, that's the part I still need to look into.


Have you looked at generalizing the visitCONCAT_VECTOR code to create SCALAR_TO_VECTOR or BUILD_VECTOR depending on the contents of the operands? At the moment the SCALAR_TO_VECTOR and BUILD_VECTOR cases are treated separately but it should be pretty easy to merge - see http://reviews.llvm.org/D7816.


http://reviews.llvm.org/D8884

EMAIL PREFERENCES
  http://reviews.llvm.org/settings/panel/emailpreferences/






More information about the llvm-commits mailing list