[llvm] r370339 - [CostModel] Model all `extractvalue`s as free.
Roman Lebedev via llvm-commits
llvm-commits at lists.llvm.org
Thu Aug 29 04:50:30 PDT 2019
Author: lebedevri
Date: Thu Aug 29 04:50:30 2019
New Revision: 370339
URL: http://llvm.org/viewvc/llvm-project?rev=370339&view=rev
Log:
[CostModel] Model all `extractvalue`s as free.
Summary:
As disscussed in https://reviews.llvm.org/D65148#1606412,
`extractvalue` don't actually generate any code,
so we should treat them as free.
Reviewers: craig.topper, RKSimon, jnspaulsson, greened, asb, t.p.northover, jmolloy, dmgreen
Reviewed By: jmolloy
Subscribers: javed.absar, hiraditya, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D66098
Modified:
llvm/trunk/include/llvm/Analysis/TargetTransformInfoImpl.h
llvm/trunk/lib/Analysis/TargetTransformInfo.cpp
llvm/trunk/test/Analysis/CostModel/AArch64/aggregates.ll
llvm/trunk/test/Analysis/CostModel/X86/aggregates.ll
Modified: llvm/trunk/include/llvm/Analysis/TargetTransformInfoImpl.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Analysis/TargetTransformInfoImpl.h?rev=370339&r1=370338&r2=370339&view=diff
==============================================================================
--- llvm/trunk/include/llvm/Analysis/TargetTransformInfoImpl.h (original)
+++ llvm/trunk/include/llvm/Analysis/TargetTransformInfoImpl.h Thu Aug 29 04:50:30 2019
@@ -840,6 +840,9 @@ public:
if (isa<PHINode>(U))
return TTI::TCC_Free; // Model all PHI nodes as free.
+ if (isa<ExtractValueInst>(U))
+ return TTI::TCC_Free; // Model all ExtractValue nodes as free.
+
// Static alloca doesn't generate target instructions.
if (auto *A = dyn_cast<AllocaInst>(U))
if (A->isStaticAlloca())
Modified: llvm/trunk/lib/Analysis/TargetTransformInfo.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Analysis/TargetTransformInfo.cpp?rev=370339&r1=370338&r2=370339&view=diff
==============================================================================
--- llvm/trunk/lib/Analysis/TargetTransformInfo.cpp (original)
+++ llvm/trunk/lib/Analysis/TargetTransformInfo.cpp Thu Aug 29 04:50:30 2019
@@ -1286,6 +1286,8 @@ int TargetTransformInfo::getInstructionT
return getVectorInstrCost(I->getOpcode(),
IE->getType(), Idx);
}
+ case Instruction::ExtractValue:
+ return 0; // Model all ExtractValue nodes as free.
case Instruction::ShuffleVector: {
const ShuffleVectorInst *Shuffle = cast<ShuffleVectorInst>(I);
Type *Ty = Shuffle->getType();
Modified: llvm/trunk/test/Analysis/CostModel/AArch64/aggregates.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Analysis/CostModel/AArch64/aggregates.ll?rev=370339&r1=370338&r2=370339&view=diff
==============================================================================
--- llvm/trunk/test/Analysis/CostModel/AArch64/aggregates.ll (original)
+++ llvm/trunk/test/Analysis/CostModel/AArch64/aggregates.ll Thu Aug 29 04:50:30 2019
@@ -5,15 +5,15 @@
define i32 @extract_first_i32({i32, i32} %agg) {
; THROUGHPUT-LABEL: 'extract_first_i32'
-; THROUGHPUT-NEXT: Cost Model: Unknown cost for instruction: %r = extractvalue { i32, i32 } %agg, 0
+; THROUGHPUT-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %r = extractvalue { i32, i32 } %agg, 0
; THROUGHPUT-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i32 %r
;
; LATENCY-LABEL: 'extract_first_i32'
-; LATENCY-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %r = extractvalue { i32, i32 } %agg, 0
+; LATENCY-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %r = extractvalue { i32, i32 } %agg, 0
; LATENCY-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret i32 %r
;
; CODESIZE-LABEL: 'extract_first_i32'
-; CODESIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %r = extractvalue { i32, i32 } %agg, 0
+; CODESIZE-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %r = extractvalue { i32, i32 } %agg, 0
; CODESIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret i32 %r
;
%r = extractvalue {i32, i32} %agg, 0
@@ -22,15 +22,15 @@ define i32 @extract_first_i32({i32, i32}
define i32 @extract_second_i32({i32, i32} %agg) {
; THROUGHPUT-LABEL: 'extract_second_i32'
-; THROUGHPUT-NEXT: Cost Model: Unknown cost for instruction: %r = extractvalue { i32, i32 } %agg, 1
+; THROUGHPUT-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %r = extractvalue { i32, i32 } %agg, 1
; THROUGHPUT-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i32 %r
;
; LATENCY-LABEL: 'extract_second_i32'
-; LATENCY-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %r = extractvalue { i32, i32 } %agg, 1
+; LATENCY-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %r = extractvalue { i32, i32 } %agg, 1
; LATENCY-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret i32 %r
;
; CODESIZE-LABEL: 'extract_second_i32'
-; CODESIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %r = extractvalue { i32, i32 } %agg, 1
+; CODESIZE-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %r = extractvalue { i32, i32 } %agg, 1
; CODESIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret i32 %r
;
%r = extractvalue {i32, i32} %agg, 1
@@ -39,15 +39,15 @@ define i32 @extract_second_i32({i32, i32
define i32 @extract_i32({i32, i1} %agg) {
; THROUGHPUT-LABEL: 'extract_i32'
-; THROUGHPUT-NEXT: Cost Model: Unknown cost for instruction: %r = extractvalue { i32, i1 } %agg, 0
+; THROUGHPUT-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %r = extractvalue { i32, i1 } %agg, 0
; THROUGHPUT-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i32 %r
;
; LATENCY-LABEL: 'extract_i32'
-; LATENCY-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %r = extractvalue { i32, i1 } %agg, 0
+; LATENCY-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %r = extractvalue { i32, i1 } %agg, 0
; LATENCY-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret i32 %r
;
; CODESIZE-LABEL: 'extract_i32'
-; CODESIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %r = extractvalue { i32, i1 } %agg, 0
+; CODESIZE-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %r = extractvalue { i32, i1 } %agg, 0
; CODESIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret i32 %r
;
%r = extractvalue {i32, i1} %agg, 0
@@ -56,15 +56,15 @@ define i32 @extract_i32({i32, i1} %agg)
define i1 @extract_i1({i32, i1} %agg) {
; THROUGHPUT-LABEL: 'extract_i1'
-; THROUGHPUT-NEXT: Cost Model: Unknown cost for instruction: %r = extractvalue { i32, i1 } %agg, 1
+; THROUGHPUT-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %r = extractvalue { i32, i1 } %agg, 1
; THROUGHPUT-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i1 %r
;
; LATENCY-LABEL: 'extract_i1'
-; LATENCY-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %r = extractvalue { i32, i1 } %agg, 1
+; LATENCY-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %r = extractvalue { i32, i1 } %agg, 1
; LATENCY-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret i1 %r
;
; CODESIZE-LABEL: 'extract_i1'
-; CODESIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %r = extractvalue { i32, i1 } %agg, 1
+; CODESIZE-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %r = extractvalue { i32, i1 } %agg, 1
; CODESIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret i1 %r
;
%r = extractvalue {i32, i1} %agg, 1
@@ -73,15 +73,15 @@ define i1 @extract_i1({i32, i1} %agg) {
define float @extract_float({i32, float} %agg) {
; THROUGHPUT-LABEL: 'extract_float'
-; THROUGHPUT-NEXT: Cost Model: Unknown cost for instruction: %r = extractvalue { i32, float } %agg, 1
+; THROUGHPUT-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %r = extractvalue { i32, float } %agg, 1
; THROUGHPUT-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret float %r
;
; LATENCY-LABEL: 'extract_float'
-; LATENCY-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %r = extractvalue { i32, float } %agg, 1
+; LATENCY-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %r = extractvalue { i32, float } %agg, 1
; LATENCY-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret float %r
;
; CODESIZE-LABEL: 'extract_float'
-; CODESIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %r = extractvalue { i32, float } %agg, 1
+; CODESIZE-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %r = extractvalue { i32, float } %agg, 1
; CODESIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret float %r
;
%r = extractvalue {i32, float} %agg, 1
@@ -90,15 +90,15 @@ define float @extract_float({i32, float}
define [42 x i42] @extract_array({i32, [42 x i42]} %agg) {
; THROUGHPUT-LABEL: 'extract_array'
-; THROUGHPUT-NEXT: Cost Model: Unknown cost for instruction: %r = extractvalue { i32, [42 x i42] } %agg, 1
+; THROUGHPUT-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %r = extractvalue { i32, [42 x i42] } %agg, 1
; THROUGHPUT-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret [42 x i42] %r
;
; LATENCY-LABEL: 'extract_array'
-; LATENCY-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %r = extractvalue { i32, [42 x i42] } %agg, 1
+; LATENCY-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %r = extractvalue { i32, [42 x i42] } %agg, 1
; LATENCY-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret [42 x i42] %r
;
; CODESIZE-LABEL: 'extract_array'
-; CODESIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %r = extractvalue { i32, [42 x i42] } %agg, 1
+; CODESIZE-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %r = extractvalue { i32, [42 x i42] } %agg, 1
; CODESIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret [42 x i42] %r
;
%r = extractvalue {i32, [42 x i42]} %agg, 1
@@ -107,15 +107,15 @@ define [42 x i42] @extract_array({i32, [
define <42 x i42> @extract_vector({i32, <42 x i42>} %agg) {
; THROUGHPUT-LABEL: 'extract_vector'
-; THROUGHPUT-NEXT: Cost Model: Unknown cost for instruction: %r = extractvalue { i32, <42 x i42> } %agg, 1
+; THROUGHPUT-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %r = extractvalue { i32, <42 x i42> } %agg, 1
; THROUGHPUT-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <42 x i42> %r
;
; LATENCY-LABEL: 'extract_vector'
-; LATENCY-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %r = extractvalue { i32, <42 x i42> } %agg, 1
+; LATENCY-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %r = extractvalue { i32, <42 x i42> } %agg, 1
; LATENCY-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <42 x i42> %r
;
; CODESIZE-LABEL: 'extract_vector'
-; CODESIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %r = extractvalue { i32, <42 x i42> } %agg, 1
+; CODESIZE-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %r = extractvalue { i32, <42 x i42> } %agg, 1
; CODESIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <42 x i42> %r
;
%r = extractvalue {i32, <42 x i42>} %agg, 1
@@ -126,15 +126,15 @@ define <42 x i42> @extract_vector({i32,
define %T1 @extract_struct({i32, %T1} %agg) {
; THROUGHPUT-LABEL: 'extract_struct'
-; THROUGHPUT-NEXT: Cost Model: Unknown cost for instruction: %r = extractvalue { i32, %T1 } %agg, 1
+; THROUGHPUT-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %r = extractvalue { i32, %T1 } %agg, 1
; THROUGHPUT-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret %T1 %r
;
; LATENCY-LABEL: 'extract_struct'
-; LATENCY-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %r = extractvalue { i32, %T1 } %agg, 1
+; LATENCY-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %r = extractvalue { i32, %T1 } %agg, 1
; LATENCY-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret %T1 %r
;
; CODESIZE-LABEL: 'extract_struct'
-; CODESIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %r = extractvalue { i32, %T1 } %agg, 1
+; CODESIZE-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %r = extractvalue { i32, %T1 } %agg, 1
; CODESIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret %T1 %r
;
%r = extractvalue {i32, %T1} %agg, 1
Modified: llvm/trunk/test/Analysis/CostModel/X86/aggregates.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Analysis/CostModel/X86/aggregates.ll?rev=370339&r1=370338&r2=370339&view=diff
==============================================================================
--- llvm/trunk/test/Analysis/CostModel/X86/aggregates.ll (original)
+++ llvm/trunk/test/Analysis/CostModel/X86/aggregates.ll Thu Aug 29 04:50:30 2019
@@ -5,15 +5,15 @@
define i32 @extract_first_i32({i32, i32} %agg) {
; THROUGHPUT-LABEL: 'extract_first_i32'
-; THROUGHPUT-NEXT: Cost Model: Unknown cost for instruction: %r = extractvalue { i32, i32 } %agg, 0
+; THROUGHPUT-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %r = extractvalue { i32, i32 } %agg, 0
; THROUGHPUT-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i32 %r
;
; LATENCY-LABEL: 'extract_first_i32'
-; LATENCY-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %r = extractvalue { i32, i32 } %agg, 0
+; LATENCY-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %r = extractvalue { i32, i32 } %agg, 0
; LATENCY-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret i32 %r
;
; CODESIZE-LABEL: 'extract_first_i32'
-; CODESIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %r = extractvalue { i32, i32 } %agg, 0
+; CODESIZE-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %r = extractvalue { i32, i32 } %agg, 0
; CODESIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret i32 %r
;
%r = extractvalue {i32, i32} %agg, 0
@@ -22,15 +22,15 @@ define i32 @extract_first_i32({i32, i32}
define i32 @extract_second_i32({i32, i32} %agg) {
; THROUGHPUT-LABEL: 'extract_second_i32'
-; THROUGHPUT-NEXT: Cost Model: Unknown cost for instruction: %r = extractvalue { i32, i32 } %agg, 1
+; THROUGHPUT-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %r = extractvalue { i32, i32 } %agg, 1
; THROUGHPUT-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i32 %r
;
; LATENCY-LABEL: 'extract_second_i32'
-; LATENCY-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %r = extractvalue { i32, i32 } %agg, 1
+; LATENCY-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %r = extractvalue { i32, i32 } %agg, 1
; LATENCY-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret i32 %r
;
; CODESIZE-LABEL: 'extract_second_i32'
-; CODESIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %r = extractvalue { i32, i32 } %agg, 1
+; CODESIZE-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %r = extractvalue { i32, i32 } %agg, 1
; CODESIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret i32 %r
;
%r = extractvalue {i32, i32} %agg, 1
@@ -39,15 +39,15 @@ define i32 @extract_second_i32({i32, i32
define i32 @extract_i32({i32, i1} %agg) {
; THROUGHPUT-LABEL: 'extract_i32'
-; THROUGHPUT-NEXT: Cost Model: Unknown cost for instruction: %r = extractvalue { i32, i1 } %agg, 0
+; THROUGHPUT-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %r = extractvalue { i32, i1 } %agg, 0
; THROUGHPUT-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i32 %r
;
; LATENCY-LABEL: 'extract_i32'
-; LATENCY-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %r = extractvalue { i32, i1 } %agg, 0
+; LATENCY-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %r = extractvalue { i32, i1 } %agg, 0
; LATENCY-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret i32 %r
;
; CODESIZE-LABEL: 'extract_i32'
-; CODESIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %r = extractvalue { i32, i1 } %agg, 0
+; CODESIZE-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %r = extractvalue { i32, i1 } %agg, 0
; CODESIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret i32 %r
;
%r = extractvalue {i32, i1} %agg, 0
@@ -56,15 +56,15 @@ define i32 @extract_i32({i32, i1} %agg)
define i1 @extract_i1({i32, i1} %agg) {
; THROUGHPUT-LABEL: 'extract_i1'
-; THROUGHPUT-NEXT: Cost Model: Unknown cost for instruction: %r = extractvalue { i32, i1 } %agg, 1
+; THROUGHPUT-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %r = extractvalue { i32, i1 } %agg, 1
; THROUGHPUT-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i1 %r
;
; LATENCY-LABEL: 'extract_i1'
-; LATENCY-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %r = extractvalue { i32, i1 } %agg, 1
+; LATENCY-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %r = extractvalue { i32, i1 } %agg, 1
; LATENCY-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret i1 %r
;
; CODESIZE-LABEL: 'extract_i1'
-; CODESIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %r = extractvalue { i32, i1 } %agg, 1
+; CODESIZE-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %r = extractvalue { i32, i1 } %agg, 1
; CODESIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret i1 %r
;
%r = extractvalue {i32, i1} %agg, 1
@@ -73,15 +73,15 @@ define i1 @extract_i1({i32, i1} %agg) {
define float @extract_float({i32, float} %agg) {
; THROUGHPUT-LABEL: 'extract_float'
-; THROUGHPUT-NEXT: Cost Model: Unknown cost for instruction: %r = extractvalue { i32, float } %agg, 1
+; THROUGHPUT-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %r = extractvalue { i32, float } %agg, 1
; THROUGHPUT-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret float %r
;
; LATENCY-LABEL: 'extract_float'
-; LATENCY-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %r = extractvalue { i32, float } %agg, 1
+; LATENCY-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %r = extractvalue { i32, float } %agg, 1
; LATENCY-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret float %r
;
; CODESIZE-LABEL: 'extract_float'
-; CODESIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %r = extractvalue { i32, float } %agg, 1
+; CODESIZE-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %r = extractvalue { i32, float } %agg, 1
; CODESIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret float %r
;
%r = extractvalue {i32, float} %agg, 1
@@ -90,15 +90,15 @@ define float @extract_float({i32, float}
define [42 x i42] @extract_array({i32, [42 x i42]} %agg) {
; THROUGHPUT-LABEL: 'extract_array'
-; THROUGHPUT-NEXT: Cost Model: Unknown cost for instruction: %r = extractvalue { i32, [42 x i42] } %agg, 1
+; THROUGHPUT-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %r = extractvalue { i32, [42 x i42] } %agg, 1
; THROUGHPUT-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret [42 x i42] %r
;
; LATENCY-LABEL: 'extract_array'
-; LATENCY-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %r = extractvalue { i32, [42 x i42] } %agg, 1
+; LATENCY-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %r = extractvalue { i32, [42 x i42] } %agg, 1
; LATENCY-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret [42 x i42] %r
;
; CODESIZE-LABEL: 'extract_array'
-; CODESIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %r = extractvalue { i32, [42 x i42] } %agg, 1
+; CODESIZE-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %r = extractvalue { i32, [42 x i42] } %agg, 1
; CODESIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret [42 x i42] %r
;
%r = extractvalue {i32, [42 x i42]} %agg, 1
@@ -107,15 +107,15 @@ define [42 x i42] @extract_array({i32, [
define <42 x i42> @extract_vector({i32, <42 x i42>} %agg) {
; THROUGHPUT-LABEL: 'extract_vector'
-; THROUGHPUT-NEXT: Cost Model: Unknown cost for instruction: %r = extractvalue { i32, <42 x i42> } %agg, 1
+; THROUGHPUT-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %r = extractvalue { i32, <42 x i42> } %agg, 1
; THROUGHPUT-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <42 x i42> %r
;
; LATENCY-LABEL: 'extract_vector'
-; LATENCY-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %r = extractvalue { i32, <42 x i42> } %agg, 1
+; LATENCY-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %r = extractvalue { i32, <42 x i42> } %agg, 1
; LATENCY-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <42 x i42> %r
;
; CODESIZE-LABEL: 'extract_vector'
-; CODESIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %r = extractvalue { i32, <42 x i42> } %agg, 1
+; CODESIZE-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %r = extractvalue { i32, <42 x i42> } %agg, 1
; CODESIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <42 x i42> %r
;
%r = extractvalue {i32, <42 x i42>} %agg, 1
@@ -126,15 +126,15 @@ define <42 x i42> @extract_vector({i32,
define %T1 @extract_struct({i32, %T1} %agg) {
; THROUGHPUT-LABEL: 'extract_struct'
-; THROUGHPUT-NEXT: Cost Model: Unknown cost for instruction: %r = extractvalue { i32, %T1 } %agg, 1
+; THROUGHPUT-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %r = extractvalue { i32, %T1 } %agg, 1
; THROUGHPUT-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret %T1 %r
;
; LATENCY-LABEL: 'extract_struct'
-; LATENCY-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %r = extractvalue { i32, %T1 } %agg, 1
+; LATENCY-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %r = extractvalue { i32, %T1 } %agg, 1
; LATENCY-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret %T1 %r
;
; CODESIZE-LABEL: 'extract_struct'
-; CODESIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %r = extractvalue { i32, %T1 } %agg, 1
+; CODESIZE-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %r = extractvalue { i32, %T1 } %agg, 1
; CODESIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret %T1 %r
;
%r = extractvalue {i32, %T1} %agg, 1
More information about the llvm-commits
mailing list