[PATCH] D54919: [X86] Add a DAG combine pre type legalization to widen division by constant splat on narrow vectors to avoid scalarization

Craig Topper via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Nov 26 14:48:18 PST 2018


craig.topper created this revision.
craig.topper added reviewers: spatel, RKSimon.

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?


https://reviews.llvm.org/D54919

Files:
  lib/Target/X86/X86ISelLowering.cpp
  test/CodeGen/X86/vector-idiv-v2i32.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D54919.175343.patch
Type: text/x-patch
Size: 20860 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20181126/8d46cd35/attachment.bin>


More information about the llvm-commits mailing list