[PATCH] Lower certain build_vectors to insertps instructions
Elena Demikhovsky
elena.demikhovsky at intel.com
Mon Apr 28 23:23:36 PDT 2014
================
Comment at: lib/Target/X86/X86ISelLowering.cpp:5462
@@ +5461,3 @@
+ ElementMoveMask | (~NonZeros & 0xf));
+ return DAG.getNode(X86ISD::INSERTPS, dl, VT, V, V, InsertpsMask);
+ }
----------------
Let's assume that the first element of the BUILD_VECTOR is "undef" and the first element of EXTRACT does not go to any place. FirstNonZeroIdx = 2, for example. The INSERTPS instruction you use copies the first element to another place, because this instruction can manipulate with the first element only.
http://reviews.llvm.org/D3521
More information about the llvm-commits
mailing list