[PATCH] D38104: [TargetTransformInfo] Handle intrinsic call in getInstructionLatency()

Hal Finkel via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Sep 21 10:04:48 PDT 2017


hfinkel added inline comments.


================
Comment at: include/llvm/Analysis/TargetTransformInfoImpl.h:792
+      const Function *F = CI->getCalledFunction();
+      if (F && F->getIntrinsicID())
+        return 1;
----------------
I think that you want to do the same thing here that we do in getCallCost (call isLoweredToCall), perhaps like this:

  if (!static_cast<T *>(this)->isLoweredToCall(F))
        return 1;



https://reviews.llvm.org/D38104





More information about the llvm-commits mailing list