forked from OSchip/llvm-project
[CostModel] remove cost-kind predicate for funnel shift costs
Completing the series of FIXME removals for special-case intrinsics:50dfa19cc7
f2c25c7079
c963bde015
01ea93d85d
This one looks quite different than the others. The size/blended cost is still potentially very far off from the throughput cost, but this is hopefully not worse on the whole. It looks like the underlying costs for the expanded shift/logic have their own cost-kind limitations. Also, we are not asking the target if it has a legal funnel shift op, so we just assume that the intrinsic gets expanded.
This commit is contained in:
parent
87f03e13ce
commit
9df32c9044
|
@ -1211,9 +1211,6 @@ public:
|
|||
}
|
||||
case Intrinsic::fshl:
|
||||
case Intrinsic::fshr: {
|
||||
// FIXME: all cost kinds should default to the same thing?
|
||||
if (CostKind != TTI::TCK_RecipThroughput)
|
||||
return BaseT::getIntrinsicInstrCost(ICA, CostKind);
|
||||
const Value *X = Args[0];
|
||||
const Value *Y = Args[1];
|
||||
const Value *Z = Args[2];
|
||||
|
|
|
@ -147,13 +147,13 @@ define void @fshl(i32 %a, i32 %b, i32 %c, <16 x i32> %va, <16 x i32> %vb, <16 x
|
|||
; LATE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void
|
||||
;
|
||||
; SIZE-LABEL: 'fshl'
|
||||
; SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %s = call i32 @llvm.fshl.i32(i32 %a, i32 %b, i32 %c)
|
||||
; SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v = call <16 x i32> @llvm.fshl.v16i32(<16 x i32> %va, <16 x i32> %vb, <16 x i32> %vc)
|
||||
; SIZE-NEXT: Cost Model: Found an estimated cost of 11 for instruction: %s = call i32 @llvm.fshl.i32(i32 %a, i32 %b, i32 %c)
|
||||
; SIZE-NEXT: Cost Model: Found an estimated cost of 10 for instruction: %v = call <16 x i32> @llvm.fshl.v16i32(<16 x i32> %va, <16 x i32> %vb, <16 x i32> %vc)
|
||||
; SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void
|
||||
;
|
||||
; SIZE_LATE-LABEL: 'fshl'
|
||||
; SIZE_LATE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %s = call i32 @llvm.fshl.i32(i32 %a, i32 %b, i32 %c)
|
||||
; SIZE_LATE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v = call <16 x i32> @llvm.fshl.v16i32(<16 x i32> %va, <16 x i32> %vb, <16 x i32> %vc)
|
||||
; SIZE_LATE-NEXT: Cost Model: Found an estimated cost of 10 for instruction: %s = call i32 @llvm.fshl.i32(i32 %a, i32 %b, i32 %c)
|
||||
; SIZE_LATE-NEXT: Cost Model: Found an estimated cost of 10 for instruction: %v = call <16 x i32> @llvm.fshl.v16i32(<16 x i32> %va, <16 x i32> %vb, <16 x i32> %vc)
|
||||
; SIZE_LATE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void
|
||||
;
|
||||
%s = call i32 @llvm.fshl.i32(i32 %a, i32 %b, i32 %c)
|
||||
|
|
|
@ -149,13 +149,13 @@ define void @fshl(i32 %a, i32 %b, i32 %c, <16 x i32> %va, <16 x i32> %vb, <16 x
|
|||
; LATE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void
|
||||
;
|
||||
; SIZE-LABEL: 'fshl'
|
||||
; SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %s = call i32 @llvm.fshl.i32(i32 %a, i32 %b, i32 %c)
|
||||
; SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v = call <16 x i32> @llvm.fshl.v16i32(<16 x i32> %va, <16 x i32> %vb, <16 x i32> %vc)
|
||||
; SIZE-NEXT: Cost Model: Found an estimated cost of 10 for instruction: %s = call i32 @llvm.fshl.i32(i32 %a, i32 %b, i32 %c)
|
||||
; SIZE-NEXT: Cost Model: Found an estimated cost of 10 for instruction: %v = call <16 x i32> @llvm.fshl.v16i32(<16 x i32> %va, <16 x i32> %vb, <16 x i32> %vc)
|
||||
; SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void
|
||||
;
|
||||
; SIZE_LATE-LABEL: 'fshl'
|
||||
; SIZE_LATE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %s = call i32 @llvm.fshl.i32(i32 %a, i32 %b, i32 %c)
|
||||
; SIZE_LATE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v = call <16 x i32> @llvm.fshl.v16i32(<16 x i32> %va, <16 x i32> %vb, <16 x i32> %vc)
|
||||
; SIZE_LATE-NEXT: Cost Model: Found an estimated cost of 10 for instruction: %s = call i32 @llvm.fshl.i32(i32 %a, i32 %b, i32 %c)
|
||||
; SIZE_LATE-NEXT: Cost Model: Found an estimated cost of 10 for instruction: %v = call <16 x i32> @llvm.fshl.v16i32(<16 x i32> %va, <16 x i32> %vb, <16 x i32> %vc)
|
||||
; SIZE_LATE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void
|
||||
;
|
||||
%s = call i32 @llvm.fshl.i32(i32 %a, i32 %b, i32 %c)
|
||||
|
|
Loading…
Reference in New Issue