This is an archive of the discontinued LLVM Phabricator instance.

Reorder operands with provided Opcode
ClosedPublic

Authored by dtemirbulatov on Aug 15 2017, 1:50 PM.

Diff Detail

Repository
rL LLVM

Event Timeline

dtemirbulatov created this revision.Aug 15 2017, 1:50 PM
RKSimon edited edge metadata.Aug 16 2017, 2:53 AM

Please can you commit reorder.ll to trunk now with the current trunk codegen, and update the patch so it shows the delta?

Also, again the tests looks more complex than they should need to be for slpvectorizer

update testcase.

remove extra flag -slp-vectorizer in test.

test update to simpler

Remove getDefaultConstantForOpcode function for now.

RKSimon accepted this revision.Aug 18 2017, 6:48 AM

Thanks for reducing this, LGTM with one minor. Also, as this is just a refactor at this point (make sure you rephrase the commit summary accordingly btw) you can probably drop the test case as its not doing anything any more.

lib/Transforms/Vectorize/SLPVectorizer.cpp
2475 ↗(On Diff #111659)

Tidyup (although I realise it increases the diff vs D28907):

Value *VLeft = I->getOperand(0);
Value *VRight = I->getOperand(1);
This revision is now accepted and ready to land.Aug 18 2017, 6:48 AM
This revision was automatically updated to reflect the committed changes.