OSDN Git Service

[X86] Add a DAG combine pre type legalization to widen division by constant splat...
authorCraig Topper <craig.topper@intel.com>
Thu, 29 Nov 2018 19:13:38 +0000 (19:13 +0000)
committerCraig Topper <craig.topper@intel.com>
Thu, 29 Nov 2018 19:13:38 +0000 (19:13 +0000)
commitdee2f99323aeb2a3ebf96fed59c484230ad2702c
tree16b353e2fada1da845f1064c5b720aaf0d0cdb90
parent3c0efb7a96d3bd4d6ff33440841c2646ebde06c4
[X86] Add a DAG combine pre type legalization to widen division by constant splat on narrow vectors to avoid scalarization

This is another patch for -x86-experimental-vector-widening. This pre widens narrow division by constants so that we can get pass the legal type check in the generic DAG combiner. Otherwise we end up scalarizing.

I've restricted this to splats for now because it was easy to just call DAG.getConstant. Not sure what we should do for non-splat? Increase the element size?Widen the constant vector by padding with 1?

Differential Revision: https://reviews.llvm.org/D54919

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@347898 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Target/X86/X86ISelLowering.cpp
test/CodeGen/X86/vector-idiv-v2i32.ll