Page MenuHomePhabricator

[CostModel][X86][ARM] Teach default implementation of getCastInstrCost to not add a split/join cost if source type and the destination type both have a SplitVector action
ClosedPublic

Authored by craig.topper on Apr 29 2020, 12:02 PM.

Details

Summary

If both the source and the destination need to be split then the two halves of the split operation are completely independent and don't need to be split or joined. So we don't need to assess a cost for the split or join.

Diff Detail

Event Timeline

craig.topper created this revision.Apr 29 2020, 12:02 PM
Herald added a project: Restricted Project. · View Herald TranscriptApr 29 2020, 12:02 PM
dmgreen added inline comments.
llvm/test/Analysis/CostModel/ARM/cast.ll
374

These all sound OK.

RKSimon accepted this revision.May 1 2020, 8:54 AM

LGTM

This revision is now accepted and ready to land.May 1 2020, 8:54 AM
This revision was automatically updated to reflect the committed changes.