This is an archive of the discontinued LLVM Phabricator instance.

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

Authored by craig.topper on Nov 26 2018, 2:48 PM.

Details

Summary

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?

Diff Detail

Repository
rL LLVM

Event Timeline

craig.topper created this revision.Nov 26 2018, 2:48 PM
RKSimon accepted this revision.Nov 29 2018, 3:42 AM

LGTM

lib/Target/X86/X86ISelLowering.cpp
41100 ↗(On Diff #175343)

match indentation of the other combines

This revision is now accepted and ready to land.Nov 29 2018, 3:42 AM
This revision was automatically updated to reflect the committed changes.