OSDN Git Service

[Hexagon] Fix wrong order of operands for vmux
authorKrzysztof Parzyszek <kparzysz@codeaurora.org>
Tue, 12 Dec 2017 19:32:41 +0000 (19:32 +0000)
committerKrzysztof Parzyszek <kparzysz@codeaurora.org>
Tue, 12 Dec 2017 19:32:41 +0000 (19:32 +0000)
commit206ac235d708d5c36ae70be6f2e0b5f6bedab650
tree4c0995f327d61b634200874b6bc387aa8136dbe1
parent1feb97a12bbc090ce0130f2f8fad4de4aa3f6c46
[Hexagon] Fix wrong order of operands for vmux

Shuffle generation uses vmux to collapse vectors resulting from two
individual shuffles into one. The indexes of the elements selected
from the first operand were indicated by 0xFF in the constant vector
used in the compare instruction, but the compare (veqb) set the bits
corresponding to the 0x00 elements, thus inverting the selection.

Reverse the order of operands to vmux to get the correct output.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@320516 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Target/Hexagon/HexagonISelDAGToDAGHVX.cpp
test/CodeGen/Hexagon/autohvx/vmux-order.ll [new file with mode: 0644]