This is an archive of the discontinued LLVM Phabricator instance.

[SDAG] Move TRUNCATE splitting logic into a helper, and use it more liberally
ClosedPublic

Authored by jmolloy on Mar 23 2015, 8:43 AM.

Details

Summary

SplitVecOp_TRUNCATE has logic for recursively splitting oversize vectors that need more than one round of splitting to become legal. There are many other ISD nodes that could benefit from this logic, so factor it out and use it for FP_TO_UINT,FP_TO_SINT,SINT_TO_FP,UINT_TO_FP and FTRUNC.

Chandler, we discussed this problem on IRC previously and you suggested that we change FP_TO_SINT and friends to never modify the width of a type, and rely on SelectionDAGBuilder to insert extra TRUNCATE nodes. While that sounded fine, it was going to be a very invasive change so I propose this instead; it's not much code and has almost no duplication.

Diff Detail

Repository
rL LLVM

Event Timeline

jmolloy updated this revision to Diff 22474.Mar 23 2015, 8:43 AM
jmolloy retitled this revision from to [SDAG] Move TRUNCATE splitting logic into a helper, and use it more liberally.
jmolloy updated this object.
jmolloy edited the test plan for this revision. (Show Details)
jmolloy added a reviewer: chandlerc.
jmolloy set the repository for this revision to rL LLVM.
jmolloy added a subscriber: Unknown Object (MLST).
ab added a subscriber: ab.Mar 23 2015, 9:45 AM
rengolin accepted this revision.Mar 30 2015, 1:46 AM
rengolin added a reviewer: rengolin.
rengolin added a subscriber: rengolin.

Hi James,

Very clean patch, LGTM. Thanks!

This revision is now accepted and ready to land.Mar 30 2015, 1:46 AM
chandlerc accepted this revision.Mar 30 2015, 2:51 PM
chandlerc edited edge metadata.

Yea, this looks fantastic.

Hi Both,

Thanks, landed in r233681.

Cheers,

James

rengolin closed this revision.May 8 2015, 5:15 AM