[X86][CostModel] Don't lookup intrinsic cost tables if the intrinsic isn't one we...
authorCraig Topper <craig.topper@intel.com>
Mon, 19 Nov 2018 18:57:31 +0000 (18:57 +0000)
committerCraig Topper <craig.topper@intel.com>
Mon, 19 Nov 2018 18:57:31 +0000 (18:57 +0000)
commita5e0380c30dfb06a4a1c3d128f458690a754404a
tree2f55f893941ed53651bea204d79a627290424d75
parent0a1cb71e64ef943f35fa4cbbc99cda29ccb59cfa
[X86][CostModel] Don't lookup intrinsic cost tables if the intrinsic isn't one we care about

We're seeing some issues internally where we sent some intrinsics into the cost model that the getTypeLegalizationCost call fails on, but X86 specific tables don't care about. Our base class implementation takes care of them. We'd just like X86 backend to ignore them.

This patch makes sure the switch returned something X86 cares 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.

Differential Revision: https://reviews.llvm.org/D54711

llvm-svn: 347248
llvm/lib/Target/X86/X86TargetTransformInfo.cpp