DAGCombiner: Turn divs of vector splats into vectorized multiplications.
authorBenjamin Kramer <benny.kra@googlemail.com>
Sat, 26 Apr 2014 12:06:28 +0000 (12:06 +0000)
committerBenjamin Kramer <benny.kra@googlemail.com>
Sat, 26 Apr 2014 12:06:28 +0000 (12:06 +0000)
commitaab6231cd910dcd40217bc9cf73bf72223f2cf30
tree0b92435c98e99a7f96f9c4b713f503d02bfb1328
parent05e00b6e65f0aa258dd2fe45778fc084cbb93c67
DAGCombiner: Turn divs of vector splats into vectorized multiplications.

Otherwise the legalizer would just scalarize everything. Support for
mulhi in the targets isn't that great yet so on most targets we get
exactly the same scalarized output. Add a test for x86 vector udiv.

I had to disable the mulhi nodes on ARM because there aren't any patterns
for it. As far as I know ARM has instructions for getting the high part of
a multiply so this should be fixed.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@207315 91177308-0d34-0410-b5e6-96231b3b80d8
include/llvm/Target/TargetLowering.h
lib/CodeGen/SelectionDAG/DAGCombiner.cpp
lib/CodeGen/SelectionDAG/TargetLowering.cpp
lib/Target/ARM/ARMISelLowering.cpp
lib/Target/ARM64/ARM64ISelLowering.cpp
test/CodeGen/X86/vector-idiv.ll [new file with mode: 0644]