[X86][XOP] Fix VPERMIL2 non-constant pool shuffle decoding (PR31296)
authorSimon Pilgrim <llvm-dev@redking.me.uk>
Wed, 7 Dec 2016 11:19:00 +0000 (11:19 +0000)
committerSimon Pilgrim <llvm-dev@redking.me.uk>
Wed, 7 Dec 2016 11:19:00 +0000 (11:19 +0000)
commitd5bc5c16b264b2fa8ddbbf850f3e1f230426ee5b
tree37d1190e3c7cbd8350068135d9d5de4d8bd830e7
parent8cec7eb6dd762850964a6c63fd9187a72d9550c0
[X86][XOP] Fix VPERMIL2 non-constant pool shuffle decoding (PR31296)

The non-constant pool version of DecodeVPERMIL2PMask was not offsetting correctly for the second input. I've updated the code to match the implementation in the constant-pool version.

Annoyingly this bug was hidden for so long as it's tricky to combine to useful variable shuffle masks that don't become constant-pool entries.

llvm-svn: 288898
llvm/lib/Target/X86/Utils/X86ShuffleDecode.cpp
llvm/test/CodeGen/X86/vector-shuffle-combining-xop.ll