X86: When lowering v8i32 himuls use the correct shuffle masks for AVX2.
authorBenjamin Kramer <benny.kra@googlemail.com>
Wed, 9 Jul 2014 11:12:39 +0000 (11:12 +0000)
committerBenjamin Kramer <benny.kra@googlemail.com>
Wed, 9 Jul 2014 11:12:39 +0000 (11:12 +0000)
commitd6f1733addc820d23560d3e06f358deb861ae94a
tree05dd6dfd9cca0a292a687ba9bb60ce1c7a92fe4a
parentafe4b2507e06c99cac87b6ae3d775604fb41c205
X86: When lowering v8i32 himuls use the correct shuffle masks for AVX2.

Turns out my trick of using the same masks for SSE4.1 and AVX2 didn't work out
as we have to blend two vectors. While there remove unecessary cross-lane moves
from the shuffles so the backend can lower it to palignr instead of vperm.

Fixes PR20118, a miscompilation of vector sdiv by constant on AVX2.

llvm-svn: 212611
llvm/lib/Target/X86/X86ISelLowering.cpp
llvm/test/CodeGen/X86/vector-idiv.ll