Skip to content

Commit efec7ed

Browse files
committed
Fixups
1 parent 3cd51a6 commit efec7ed

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

llvm/include/llvm/CodeGen/BasicTTIImpl.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -294,7 +294,7 @@ class BasicTTIImplBase : public TargetTransformInfoImplCRTPBase<T> {
294294
/// the cost, which includes the cost of the mask (if required), and the loads
295295
/// for values returned via output pointers. \p LC is the scalar libcall and
296296
/// \p CallRetElementIndex (optional) is the struct element which is mapped to
297-
/// the call return value. If std::nullopt is returned, the no vector library
297+
/// the call return value. If std::nullopt is returned, then no vector library
298298
/// call is available, so the intrinsic should be assigned the default cost
299299
/// (e.g. scalarization).
300300
std::optional<InstructionCost> getMultipleResultIntrinsicVectorLibCallCost(

llvm/lib/Analysis/CostModel.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -44,9 +44,9 @@ static cl::opt<bool> TypeBasedIntrinsicCost("type-based-intrinsic-cost",
4444
cl::desc("Calculate intrinsics cost based only on argument types"),
4545
cl::init(false));
4646

47-
static cl::opt<bool> LibCallBasedIntrinsicCost(
48-
"libcall-based-intrinsic-cost",
49-
cl::desc("Calculate intrinsics cost using target library info"),
47+
static cl::opt<bool> PreferIntrinsicCost(
48+
"prefer-intrinsic-cost",
49+
cl::desc("Prefer using getIntrinsicInstrCost over getInstructionCost"),
5050
cl::init(false));
5151

5252
#define CM_NAME "cost-model"
@@ -63,7 +63,7 @@ PreservedAnalyses CostModelPrinterPass::run(Function &F,
6363
// which cost kind to print.
6464
InstructionCost Cost;
6565
auto *II = dyn_cast<IntrinsicInst>(&Inst);
66-
if (II && (LibCallBasedIntrinsicCost || TypeBasedIntrinsicCost)) {
66+
if (II && (PreferIntrinsicCost || TypeBasedIntrinsicCost)) {
6767
IntrinsicCostAttributes ICA(
6868
II->getIntrinsicID(), *II, InstructionCost::getInvalid(),
6969
/*TypeBasedOnly=*/TypeBasedIntrinsicCost, &TLI);

llvm/test/Analysis/CostModel/AArch64/sincos.ll

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
; NOTE: Assertions have been autogenerated by utils/update_analyze_test_checks.py UTC_ARGS: --filter "sincos"
22
; RUN: opt < %s -mtriple=aarch64-gnu-linux -mattr=+neon,+sve -passes="print<cost-model>" -cost-kind=throughput 2>&1 -disable-output | FileCheck %s
3-
; RUN: opt < %s -mtriple=aarch64-gnu-linux -mattr=+neon,+sve -vector-library=ArmPL -passes="print<cost-model>" -libcall-based-intrinsic-cost -cost-kind=throughput 2>&1 -disable-output | FileCheck %s -check-prefix=CHECK-VECLIB
3+
; RUN: opt < %s -mtriple=aarch64-gnu-linux -mattr=+neon,+sve -vector-library=ArmPL -passes="print<cost-model>" -prefer-intrinsic-cost -cost-kind=throughput 2>&1 -disable-output | FileCheck %s -check-prefix=CHECK-VECLIB
44

55
define void @sincos() {
66
; CHECK-LABEL: 'sincos'

0 commit comments

Comments
 (0)