diff --git a/llvm/lib/Target/AArch64/AArch64Subtarget.h b/llvm/lib/Target/AArch64/AArch64Subtarget.h --- a/llvm/lib/Target/AArch64/AArch64Subtarget.h +++ b/llvm/lib/Target/AArch64/AArch64Subtarget.h @@ -209,9 +209,7 @@ } unsigned getMaxInterleaveFactor() const { return MaxInterleaveFactor; } - unsigned getVectorInsertExtractBaseCost() const { - return VectorInsertExtractBaseCost; - } + unsigned getVectorInsertExtractBaseCost() const; unsigned getCacheLineSize() const override { return CacheLineSize; } unsigned getPrefetchDistance() const override { return PrefetchDistance; } unsigned getMinPrefetchStride(unsigned NumMemAccesses, diff --git a/llvm/lib/Target/AArch64/AArch64Subtarget.cpp b/llvm/lib/Target/AArch64/AArch64Subtarget.cpp --- a/llvm/lib/Target/AArch64/AArch64Subtarget.cpp +++ b/llvm/lib/Target/AArch64/AArch64Subtarget.cpp @@ -52,6 +52,15 @@ static cl::opt UseAA("aarch64-use-aa", cl::init(true), cl::desc("Enable the use of AA during codegen.")); +static cl::opt VectorInsertExtractCostAdjustment( + "aarch64-insert-extract-cost-adjustment", cl::init(0), + cl::desc("Adjustment to base cost of vector insert/extract"), cl::Hidden); + +unsigned AArch64Subtarget::getVectorInsertExtractBaseCost() const { + return std::max(0, static_cast(VectorInsertExtractBaseCost) + + VectorInsertExtractCostAdjustment); +} + AArch64Subtarget &AArch64Subtarget::initializeSubtargetDependencies( StringRef FS, StringRef CPUString, StringRef TuneCPUString) { // Determine default and user-specified characteristics diff --git a/llvm/test/Analysis/CostModel/AArch64/sve-insert-extract.ll b/llvm/test/Analysis/CostModel/AArch64/sve-insert-extract.ll --- a/llvm/test/Analysis/CostModel/AArch64/sve-insert-extract.ll +++ b/llvm/test/Analysis/CostModel/AArch64/sve-insert-extract.ll @@ -1,55 +1,227 @@ -; NOTE: Assertions have been autogenerated by utils/update_test_checks.py +; NOTE: Assertions have been autogenerated by utils/update_analyze_test_checks.py + ; RUN: opt -passes='print' 2>&1 -disable-output -S < %s | FileCheck %s +; RUN: opt -aarch64-insert-extract-cost-adjustment=100000 -passes='print' 2>&1 -disable-output -S < %s | FileCheck --check-prefix=ADJUST-INCREASE %s +; RUN: opt -aarch64-insert-extract-cost-adjustment=-100000 -passes='print' 2>&1 -disable-output -S < %s | FileCheck --check-prefix=ADJUST-DECREASE-UNDERFLOW %s +; RUN: opt -aarch64-insert-extract-cost-adjustment=-1 -passes='print' 2>&1 -disable-output -S < %s | FileCheck --check-prefix=ADJUST-DECREASE-ONE %s target triple = "aarch64-unknown-linux-gnu" define void @ins_el0() #0 { -; CHECK: Cost Model: Found an estimated cost of 0 for instruction: %v0 = insertelement zeroinitializer, i8 0, i64 0 -; CHECK: Cost Model: Found an estimated cost of 0 for instruction: %v1 = insertelement zeroinitializer, i16 0, i64 0 -; CHECK: Cost Model: Found an estimated cost of 0 for instruction: %v2 = insertelement zeroinitializer, i32 0, i64 0 -; CHECK: Cost Model: Found an estimated cost of 0 for instruction: %v3 = insertelement zeroinitializer, i64 0, i64 0 +; CHECK-LABEL: 'ins_el0' +; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %v0 = insertelement zeroinitializer, i8 0, i64 0 +; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %v1 = insertelement zeroinitializer, i16 0, i64 0 +; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %v2 = insertelement zeroinitializer, i32 0, i64 0 +; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %v3 = insertelement zeroinitializer, i64 0, i64 0 +; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %v4 = insertelement zeroinitializer, float 0.000000e+00, i64 0 +; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %v5 = insertelement zeroinitializer, double 0.000000e+00, i64 0 +; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void +; +; ADJUST-INCREASE-LABEL: 'ins_el0' +; ADJUST-INCREASE-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %v0 = insertelement zeroinitializer, i8 0, i64 0 +; ADJUST-INCREASE-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %v1 = insertelement zeroinitializer, i16 0, i64 0 +; ADJUST-INCREASE-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %v2 = insertelement zeroinitializer, i32 0, i64 0 +; ADJUST-INCREASE-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %v3 = insertelement zeroinitializer, i64 0, i64 0 +; ADJUST-INCREASE-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %v4 = insertelement zeroinitializer, float 0.000000e+00, i64 0 +; ADJUST-INCREASE-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %v5 = insertelement zeroinitializer, double 0.000000e+00, i64 0 +; ADJUST-INCREASE-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void +; +; ADJUST-DECREASE-UNDERFLOW-LABEL: 'ins_el0' +; ADJUST-DECREASE-UNDERFLOW-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %v0 = insertelement zeroinitializer, i8 0, i64 0 +; ADJUST-DECREASE-UNDERFLOW-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %v1 = insertelement zeroinitializer, i16 0, i64 0 +; ADJUST-DECREASE-UNDERFLOW-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %v2 = insertelement zeroinitializer, i32 0, i64 0 +; ADJUST-DECREASE-UNDERFLOW-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %v3 = insertelement zeroinitializer, i64 0, i64 0 +; ADJUST-DECREASE-UNDERFLOW-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %v4 = insertelement zeroinitializer, float 0.000000e+00, i64 0 +; ADJUST-DECREASE-UNDERFLOW-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %v5 = insertelement zeroinitializer, double 0.000000e+00, i64 0 +; ADJUST-DECREASE-UNDERFLOW-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void +; +; ADJUST-DECREASE-ONE-LABEL: 'ins_el0' +; ADJUST-DECREASE-ONE-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %v0 = insertelement zeroinitializer, i8 0, i64 0 +; ADJUST-DECREASE-ONE-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %v1 = insertelement zeroinitializer, i16 0, i64 0 +; ADJUST-DECREASE-ONE-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %v2 = insertelement zeroinitializer, i32 0, i64 0 +; ADJUST-DECREASE-ONE-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %v3 = insertelement zeroinitializer, i64 0, i64 0 +; ADJUST-DECREASE-ONE-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %v4 = insertelement zeroinitializer, float 0.000000e+00, i64 0 +; ADJUST-DECREASE-ONE-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %v5 = insertelement zeroinitializer, double 0.000000e+00, i64 0 +; ADJUST-DECREASE-ONE-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void +; +; ADJUST-DECREASE-LABEL: 'ins_el0' +; ADJUST-DECREASE-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %v0 = insertelement zeroinitializer, i8 0, i64 0 +; ADJUST-DECREASE-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %v1 = insertelement zeroinitializer, i16 0, i64 0 +; ADJUST-DECREASE-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %v2 = insertelement zeroinitializer, i32 0, i64 0 +; ADJUST-DECREASE-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %v3 = insertelement zeroinitializer, i64 0, i64 0 +; ADJUST-DECREASE-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %v4 = insertelement zeroinitializer, float 0.000000e+00, i64 0 +; ADJUST-DECREASE-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %v5 = insertelement zeroinitializer, double 0.000000e+00, i64 0 +; ADJUST-DECREASE-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void %v0 = insertelement zeroinitializer, i8 0, i64 0 %v1 = insertelement zeroinitializer, i16 0, i64 0 %v2 = insertelement zeroinitializer, i32 0, i64 0 %v3 = insertelement zeroinitializer, i64 0, i64 0 + %v4 = insertelement zeroinitializer, float 0., i64 0 + %v5 = insertelement zeroinitializer, double 0., i64 0 ret void } define void @ins_el1() #0 { -; CHECK: Cost Model: Found an estimated cost of 3 for instruction: %v0 = insertelement zeroinitializer, i8 0, i64 1 -; CHECK: Cost Model: Found an estimated cost of 3 for instruction: %v1 = insertelement zeroinitializer, i16 0, i64 1 -; CHECK: Cost Model: Found an estimated cost of 3 for instruction: %v2 = insertelement zeroinitializer, i32 0, i64 1 -; CHECK: Cost Model: Found an estimated cost of 3 for instruction: %v3 = insertelement zeroinitializer, i64 0, i64 1 +; CHECK-LABEL: 'ins_el1' +; CHECK-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %v0 = insertelement zeroinitializer, i8 0, i64 1 +; CHECK-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %v1 = insertelement zeroinitializer, i16 0, i64 1 +; CHECK-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %v2 = insertelement zeroinitializer, i32 0, i64 1 +; CHECK-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %v3 = insertelement zeroinitializer, i64 0, i64 1 +; CHECK-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %v4 = insertelement zeroinitializer, float 0.000000e+00, i64 1 +; CHECK-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %v5 = insertelement zeroinitializer, double 0.000000e+00, i64 1 +; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void +; +; ADJUST-INCREASE-LABEL: 'ins_el1' +; ADJUST-INCREASE-NEXT: Cost Model: Found an estimated cost of 100003 for instruction: %v0 = insertelement zeroinitializer, i8 0, i64 1 +; ADJUST-INCREASE-NEXT: Cost Model: Found an estimated cost of 100003 for instruction: %v1 = insertelement zeroinitializer, i16 0, i64 1 +; ADJUST-INCREASE-NEXT: Cost Model: Found an estimated cost of 100003 for instruction: %v2 = insertelement zeroinitializer, i32 0, i64 1 +; ADJUST-INCREASE-NEXT: Cost Model: Found an estimated cost of 100003 for instruction: %v3 = insertelement zeroinitializer, i64 0, i64 1 +; ADJUST-INCREASE-NEXT: Cost Model: Found an estimated cost of 100003 for instruction: %v4 = insertelement zeroinitializer, float 0.000000e+00, i64 1 +; ADJUST-INCREASE-NEXT: Cost Model: Found an estimated cost of 100003 for instruction: %v5 = insertelement zeroinitializer, double 0.000000e+00, i64 1 +; ADJUST-INCREASE-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void +; +; ADJUST-DECREASE-UNDERFLOW-LABEL: 'ins_el1' +; ADJUST-DECREASE-UNDERFLOW-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %v0 = insertelement zeroinitializer, i8 0, i64 1 +; ADJUST-DECREASE-UNDERFLOW-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %v1 = insertelement zeroinitializer, i16 0, i64 1 +; ADJUST-DECREASE-UNDERFLOW-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %v2 = insertelement zeroinitializer, i32 0, i64 1 +; ADJUST-DECREASE-UNDERFLOW-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %v3 = insertelement zeroinitializer, i64 0, i64 1 +; ADJUST-DECREASE-UNDERFLOW-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %v4 = insertelement zeroinitializer, float 0.000000e+00, i64 1 +; ADJUST-DECREASE-UNDERFLOW-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %v5 = insertelement zeroinitializer, double 0.000000e+00, i64 1 +; ADJUST-DECREASE-UNDERFLOW-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void +; +; ADJUST-DECREASE-ONE-LABEL: 'ins_el1' +; ADJUST-DECREASE-ONE-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v0 = insertelement zeroinitializer, i8 0, i64 1 +; ADJUST-DECREASE-ONE-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v1 = insertelement zeroinitializer, i16 0, i64 1 +; ADJUST-DECREASE-ONE-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v2 = insertelement zeroinitializer, i32 0, i64 1 +; ADJUST-DECREASE-ONE-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v3 = insertelement zeroinitializer, i64 0, i64 1 +; ADJUST-DECREASE-ONE-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v4 = insertelement zeroinitializer, float 0.000000e+00, i64 1 +; ADJUST-DECREASE-ONE-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v5 = insertelement zeroinitializer, double 0.000000e+00, i64 1 +; ADJUST-DECREASE-ONE-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void +; +; ADJUST-DECREASE-LABEL: 'ins_el1' +; ADJUST-DECREASE-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %v0 = insertelement zeroinitializer, i8 0, i64 1 +; ADJUST-DECREASE-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %v1 = insertelement zeroinitializer, i16 0, i64 1 +; ADJUST-DECREASE-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %v2 = insertelement zeroinitializer, i32 0, i64 1 +; ADJUST-DECREASE-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %v3 = insertelement zeroinitializer, i64 0, i64 1 +; ADJUST-DECREASE-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %v4 = insertelement zeroinitializer, float 0.000000e+00, i64 1 +; ADJUST-DECREASE-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %v5 = insertelement zeroinitializer, double 0.000000e+00, i64 1 +; ADJUST-DECREASE-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void %v0 = insertelement zeroinitializer, i8 0, i64 1 %v1 = insertelement zeroinitializer, i16 0, i64 1 %v2 = insertelement zeroinitializer, i32 0, i64 1 %v3 = insertelement zeroinitializer, i64 0, i64 1 + %v4 = insertelement zeroinitializer, float 0., i64 1 + %v5 = insertelement zeroinitializer, double 0., i64 1 ret void } define void @ext_el0() #0 { -; CHECK: Cost Model: Found an estimated cost of 0 for instruction: %v0 = extractelement zeroinitializer, i64 0 -; CHECK: Cost Model: Found an estimated cost of 0 for instruction: %v1 = extractelement zeroinitializer, i64 0 -; CHECK: Cost Model: Found an estimated cost of 0 for instruction: %v2 = extractelement zeroinitializer, i64 0 -; CHECK: Cost Model: Found an estimated cost of 0 for instruction: %v3 = extractelement zeroinitializer, i64 0 +; CHECK-LABEL: 'ext_el0' +; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %v0 = extractelement zeroinitializer, i64 0 +; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %v1 = extractelement zeroinitializer, i64 0 +; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %v2 = extractelement zeroinitializer, i64 0 +; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %v3 = extractelement zeroinitializer, i64 0 +; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %v4 = extractelement zeroinitializer, i64 0 +; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %v5 = extractelement zeroinitializer, i64 0 +; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void +; +; ADJUST-INCREASE-LABEL: 'ext_el0' +; ADJUST-INCREASE-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %v0 = extractelement zeroinitializer, i64 0 +; ADJUST-INCREASE-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %v1 = extractelement zeroinitializer, i64 0 +; ADJUST-INCREASE-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %v2 = extractelement zeroinitializer, i64 0 +; ADJUST-INCREASE-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %v3 = extractelement zeroinitializer, i64 0 +; ADJUST-INCREASE-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %v4 = extractelement zeroinitializer, i64 0 +; ADJUST-INCREASE-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %v5 = extractelement zeroinitializer, i64 0 +; ADJUST-INCREASE-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void +; +; ADJUST-DECREASE-UNDERFLOW-LABEL: 'ext_el0' +; ADJUST-DECREASE-UNDERFLOW-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %v0 = extractelement zeroinitializer, i64 0 +; ADJUST-DECREASE-UNDERFLOW-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %v1 = extractelement zeroinitializer, i64 0 +; ADJUST-DECREASE-UNDERFLOW-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %v2 = extractelement zeroinitializer, i64 0 +; ADJUST-DECREASE-UNDERFLOW-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %v3 = extractelement zeroinitializer, i64 0 +; ADJUST-DECREASE-UNDERFLOW-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %v4 = extractelement zeroinitializer, i64 0 +; ADJUST-DECREASE-UNDERFLOW-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %v5 = extractelement zeroinitializer, i64 0 +; ADJUST-DECREASE-UNDERFLOW-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void +; +; ADJUST-DECREASE-ONE-LABEL: 'ext_el0' +; ADJUST-DECREASE-ONE-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %v0 = extractelement zeroinitializer, i64 0 +; ADJUST-DECREASE-ONE-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %v1 = extractelement zeroinitializer, i64 0 +; ADJUST-DECREASE-ONE-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %v2 = extractelement zeroinitializer, i64 0 +; ADJUST-DECREASE-ONE-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %v3 = extractelement zeroinitializer, i64 0 +; ADJUST-DECREASE-ONE-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %v4 = extractelement zeroinitializer, i64 0 +; ADJUST-DECREASE-ONE-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %v5 = extractelement zeroinitializer, i64 0 +; ADJUST-DECREASE-ONE-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void +; +; ADJUST-DECREASE-LABEL: 'ext_el0' +; ADJUST-DECREASE-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %v0 = extractelement zeroinitializer, i64 0 +; ADJUST-DECREASE-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %v1 = extractelement zeroinitializer, i64 0 +; ADJUST-DECREASE-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %v2 = extractelement zeroinitializer, i64 0 +; ADJUST-DECREASE-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %v3 = extractelement zeroinitializer, i64 0 +; ADJUST-DECREASE-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %v4 = extractelement zeroinitializer, i64 0 +; ADJUST-DECREASE-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %v5 = extractelement zeroinitializer, i64 0 +; ADJUST-DECREASE-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void %v0 = extractelement zeroinitializer, i64 0 %v1 = extractelement zeroinitializer, i64 0 %v2 = extractelement zeroinitializer, i64 0 %v3 = extractelement zeroinitializer, i64 0 + %v4 = extractelement zeroinitializer, i64 0 + %v5 = extractelement zeroinitializer, i64 0 ret void } define void @ext_el1() #0 { -; CHECK: Cost Model: Found an estimated cost of 3 for instruction: %v0 = extractelement zeroinitializer, i64 1 -; CHECK: Cost Model: Found an estimated cost of 3 for instruction: %v1 = extractelement zeroinitializer, i64 1 -; CHECK: Cost Model: Found an estimated cost of 3 for instruction: %v2 = extractelement zeroinitializer, i64 1 -; CHECK: Cost Model: Found an estimated cost of 3 for instruction: %v3 = extractelement zeroinitializer, i64 1 +; CHECK-LABEL: 'ext_el1' +; CHECK-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %v0 = extractelement zeroinitializer, i64 1 +; CHECK-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %v1 = extractelement zeroinitializer, i64 1 +; CHECK-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %v2 = extractelement zeroinitializer, i64 1 +; CHECK-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %v3 = extractelement zeroinitializer, i64 1 +; CHECK-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %v4 = extractelement zeroinitializer, i64 1 +; CHECK-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %v5 = extractelement zeroinitializer, i64 1 +; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void +; +; ADJUST-INCREASE-LABEL: 'ext_el1' +; ADJUST-INCREASE-NEXT: Cost Model: Found an estimated cost of 100003 for instruction: %v0 = extractelement zeroinitializer, i64 1 +; ADJUST-INCREASE-NEXT: Cost Model: Found an estimated cost of 100003 for instruction: %v1 = extractelement zeroinitializer, i64 1 +; ADJUST-INCREASE-NEXT: Cost Model: Found an estimated cost of 100003 for instruction: %v2 = extractelement zeroinitializer, i64 1 +; ADJUST-INCREASE-NEXT: Cost Model: Found an estimated cost of 100003 for instruction: %v3 = extractelement zeroinitializer, i64 1 +; ADJUST-INCREASE-NEXT: Cost Model: Found an estimated cost of 100003 for instruction: %v4 = extractelement zeroinitializer, i64 1 +; ADJUST-INCREASE-NEXT: Cost Model: Found an estimated cost of 100003 for instruction: %v5 = extractelement zeroinitializer, i64 1 +; ADJUST-INCREASE-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void +; +; ADJUST-DECREASE-UNDERFLOW-LABEL: 'ext_el1' +; ADJUST-DECREASE-UNDERFLOW-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %v0 = extractelement zeroinitializer, i64 1 +; ADJUST-DECREASE-UNDERFLOW-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %v1 = extractelement zeroinitializer, i64 1 +; ADJUST-DECREASE-UNDERFLOW-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %v2 = extractelement zeroinitializer, i64 1 +; ADJUST-DECREASE-UNDERFLOW-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %v3 = extractelement zeroinitializer, i64 1 +; ADJUST-DECREASE-UNDERFLOW-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %v4 = extractelement zeroinitializer, i64 1 +; ADJUST-DECREASE-UNDERFLOW-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %v5 = extractelement zeroinitializer, i64 1 +; ADJUST-DECREASE-UNDERFLOW-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void +; +; ADJUST-DECREASE-ONE-LABEL: 'ext_el1' +; ADJUST-DECREASE-ONE-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v0 = extractelement zeroinitializer, i64 1 +; ADJUST-DECREASE-ONE-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v1 = extractelement zeroinitializer, i64 1 +; ADJUST-DECREASE-ONE-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v2 = extractelement zeroinitializer, i64 1 +; ADJUST-DECREASE-ONE-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v3 = extractelement zeroinitializer, i64 1 +; ADJUST-DECREASE-ONE-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v4 = extractelement zeroinitializer, i64 1 +; ADJUST-DECREASE-ONE-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v5 = extractelement zeroinitializer, i64 1 +; ADJUST-DECREASE-ONE-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void +; +; ADJUST-DECREASE-LABEL: 'ext_el1' +; ADJUST-DECREASE-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %v0 = extractelement zeroinitializer, i64 1 +; ADJUST-DECREASE-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %v1 = extractelement zeroinitializer, i64 1 +; ADJUST-DECREASE-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %v2 = extractelement zeroinitializer, i64 1 +; ADJUST-DECREASE-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %v3 = extractelement zeroinitializer, i64 1 +; ADJUST-DECREASE-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %v4 = extractelement zeroinitializer, i64 1 +; ADJUST-DECREASE-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %v5 = extractelement zeroinitializer, i64 1 +; ADJUST-DECREASE-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void %v0 = extractelement zeroinitializer, i64 1 %v1 = extractelement zeroinitializer, i64 1 %v2 = extractelement zeroinitializer, i64 1 %v3 = extractelement zeroinitializer, i64 1 + %v4 = extractelement zeroinitializer, i64 1 + %v5 = extractelement zeroinitializer, i64 1 ret void }