[CostModel][X86] Merge getTypeBasedIntrinsicInstrCost into getIntrinsicInstrCost
authorSimon Pilgrim <llvm-dev@redking.me.uk>
Wed, 7 Sep 2022 10:27:40 +0000 (11:27 +0100)
committerSimon Pilgrim <llvm-dev@redking.me.uk>
Wed, 7 Sep 2022 11:04:09 +0000 (12:04 +0100)
commite74102a9637edc65baa1a391031a9791c147c3e2
treea527dc1a61905f158e39a44b1d2a4c378b8581d1
parentefa65ef281963870dc032bcedce5d64e977da293
[CostModel][X86] Merge getTypeBasedIntrinsicInstrCost into getIntrinsicInstrCost

For the few non type based intrinsic cases we can just check for !isTypeBasedOnly() to access the args directly.

I don't think we have a need to keep getTypeBasedIntrinsicInstrCost in BasicTTIImpl.h any more and can do a similar merge there as well - but it's a messier refactor and will take a while.
llvm/lib/Target/X86/X86TargetTransformInfo.cpp
llvm/lib/Target/X86/X86TargetTransformInfo.h
llvm/test/Analysis/CostModel/X86/cttz.ll