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

Craig Topper via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Nov 19 10:20:18 PST 2018


craig.topper created this revision.
craig.topper added reviewers: RKSimon, spatel.

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.


https://reviews.llvm.org/D54711

Files:
  lib/Target/X86/X86TargetTransformInfo.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D54711.174639.patch
Type: text/x-patch
Size: 5833 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20181119/82e85ee7/attachment.bin>


More information about the llvm-commits mailing list