[PATCH] D90070: [CostModel] Add optional VecPred argument to getCmpSelInstrCost.

Simon Pilgrim via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sun Oct 25 11:20:15 PDT 2020


RKSimon added inline comments.


================
Comment at: llvm/lib/Target/AArch64/AArch64TargetTransformInfo.cpp:702
+        VecPred = CurrentPred;
+    }
+    // Check if we have a compare/select chain that can be lowered using CMxx &
----------------
Would it make sense to do this in TargetTransformInfo::getCmpSelInstrCost? Most platforms are likely to do something similar.


================
Comment at: llvm/lib/Target/AArch64/AArch64TargetTransformInfo.cpp:706
+    if (VecPred >= CmpInst::FIRST_ICMP_PREDICATE &&
+        VecPred <= CmpInst::LAST_ICMP_PREDICATE) {
+      static const auto ValidMinMaxTys = {MVT::v8i8,  MVT::v16i8, MVT::v4i16,
----------------
isIntPredicate ?


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D90070/new/

https://reviews.llvm.org/D90070



More information about the llvm-commits mailing list