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.