OSDN Git Service

Lower insertelement and extractelement.
authorMatt Wala <wala@chromium.org>
Fri, 18 Jul 2014 19:45:09 +0000 (12:45 -0700)
committerMatt Wala <wala@chromium.org>
Fri, 18 Jul 2014 19:45:09 +0000 (12:45 -0700)
commit49889239d4c7ab296c7430722d36032d905110b6
tree1417eefdd0b05053a5c34913bac94d74d5bb0b42
parent7fa22d8a73def01899c5f30f20b914c65d5850d5
Lower insertelement and extractelement.

Use instructions that do the operations in registers and that are
available in SSE2. Spill to memory to perform the operation in the
absence of any other reasonable options (v16i8 and v16i1).

Unfortunately there is no natural class of SSE2 instructions that
insertelement / extractelement can get lowered
to for all vector types (though pinsr[bwd] and pextr[bwd] are
available in SSE4.1). There are in some cases a large number of
choices available for lowering and I have not looked into which
choices are the best yet, besides using LLVM output as a guide.

BUG=none
R=jvoung@chromium.org, stichnot@chromium.org

Review URL: https://codereview.chromium.org/401523003
15 files changed:
crosstest/runtests.sh
crosstest/test_vector_ops.def [new file with mode: 0644]
crosstest/test_vector_ops.ll [new file with mode: 0644]
crosstest/test_vector_ops_main.cpp [new file with mode: 0644]
src/IceConverter.cpp
src/IceInst.cpp
src/IceInst.h
src/IceInstX8632.cpp
src/IceInstX8632.def
src/IceInstX8632.h
src/IceTargetLowering.cpp
src/IceTargetLowering.h
src/IceTargetLoweringX8632.cpp
src/IceTargetLoweringX8632.h
tests_lit/llvm2ice_tests/vector-ops.ll [new file with mode: 0644]