aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/Target/WebAssembly/WebAssemblyFixFunctionBitcasts.cpp
diff options
context:
space:
mode:
authorCraig Topper <craig.topper@intel.com>2017-12-08 00:16:09 +0000
committerCraig Topper <craig.topper@intel.com>2017-12-08 00:16:09 +0000
commit323ba39f101ca87be4a93e6967ab89ef93071053 (patch)
tree6a9d813a251e6dd2e791757c197c73be8ba9ede3 /llvm/lib/Target/WebAssembly/WebAssemblyFixFunctionBitcasts.cpp
parentfd86b3cf22c4b429ceb056ef22f33286add83c89 (diff)
downloadllvm-323ba39f101ca87be4a93e6967ab89ef93071053.zip
llvm-323ba39f101ca87be4a93e6967ab89ef93071053.tar.gz
llvm-323ba39f101ca87be4a93e6967ab89ef93071053.tar.bz2
[X86] Handle alls version of vXi1 insert_vector_elt with a constant index without falling back to shuffles.
We previously only supported inserting to the LSB or MSB where it was easy to zero to perform an OR to insert. This change effectively extracts the old value and the new value, xors them together and then xors that single bit with the correct location in the original vector. This will cancel out the old value in the first xor leaving the new value in the position. The way I've implemented this uses 3 shifts and two xors and uses an additional register. We can avoid the additional register at the cost of another shift. llvm-svn: 320120
Diffstat (limited to 'llvm/lib/Target/WebAssembly/WebAssemblyFixFunctionBitcasts.cpp')
0 files changed, 0 insertions, 0 deletions