This is an archive of the discontinued LLVM Phabricator instance.

X86: Refactor type-splitting to target-legal size vector to a helper function
ClosedPublic

Authored by zvi on Jan 10 2018, 4:45 PM.

Details

Summary

This is a preparatory step for D41811: refactoring code for breaking vector operands of binary operation to legal-types.

Event Timeline

zvi created this revision.Jan 10 2018, 4:45 PM
RKSimon accepted this revision.Jan 11 2018, 2:44 AM

LGTM with a couple of minors

lib/Target/X86/X86ISelLowering.cpp
33987

operations

34001

As this is now a general function, please add an assertion (same for 256/128 cases):

assert((VT.getSizeInBits() % 512) == 0 && "Illegal vector size");
34006

As this is now a general function, please add for the else clause:

assert(Subtarget.hasSSE2() && "SSE2 required");
This revision is now accepted and ready to land.Jan 11 2018, 2:44 AM
zvi updated this revision to Diff 129461.Jan 11 2018, 9:25 AM

Add asserions for type sizes and fix typo in comment

This revision was automatically updated to reflect the committed changes.