This is an archive of the discontinued LLVM Phabricator instance.

[X86][CostModel] Don't lookup intrinsic cost tables if the intrinsic isn't one we care about
ClosedPublic

Authored by craig.topper on Nov 19 2018, 10:20 AM.

Details

Summary

Our out of tree vectorizer seems to be sending some out of tree intrinsics through with types that can't be legalized. This causes getTypeLegalizationCost to fail here. I'd like to be able to just send these intrinsics down to the base class that knows how to deal with them without teaching x86 how to ignore them.

This patch makes sure the switch returned something we cared about and skips the table lookups and type legalization call if not. Probably more efficient too since we don't go scanning the tables for every intrinsic we could possibly see.

Diff Detail

Event Timeline

craig.topper created this revision.Nov 19 2018, 10:20 AM
This revision is now accepted and ready to land.Nov 19 2018, 10:32 AM
This revision was automatically updated to reflect the committed changes.