[PATCH] D79164: [CostModel] getCFInstrCost

Daniil Fukalov via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jun 9 17:43:00 PDT 2020


dfukalov added inline comments.


================
Comment at: llvm/test/Analysis/CostModel/ARM/cast.ll:1721-1729
+; CHECK-V8M-MAIN-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %loadi8 = load i8, i8* undef, align 1
+; CHECK-V8M-MAIN-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %loadi16 = load i16, i16* undef, align 2
+; CHECK-V8M-MAIN-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %loadi32 = load i32, i32* undef, align 4
+; CHECK-V8M-MAIN-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %loadv2i8 = load <2 x i8>, <2 x i8>* undef, align 2
+; CHECK-V8M-MAIN-NEXT:  Cost Model: Found an estimated cost of 4 for instruction: %loadv4i8 = load <4 x i8>, <4 x i8>* undef, align 4
+; CHECK-V8M-MAIN-NEXT:  Cost Model: Found an estimated cost of 8 for instruction: %loadv8i8 = load <8 x i8>, <8 x i8>* undef, align 8
+; CHECK-V8M-MAIN-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %loadv2i16 = load <2 x i16>, <2 x i16>* undef, align 4
----------------
Is there actual need to specify align here? It is not changed in many other lines..
The same question for a number of bunches below


================
Comment at: llvm/test/Analysis/CostModel/ARM/mve-gather-scatter-cost.ll:158-161
+
+
+
+
----------------
Do wen need theese extra lines? Is their number connected to lines removed before?-)
The same strange things below


================
Comment at: llvm/test/Transforms/LoopVectorize/AArch64/aarch64-predication.ll:10-15
 ; "optsize" attribute to disable all interleaving calculations.  A cost of 4
 ; for %tmp4 indicates that we would scalarize it's operand (%tmp3), giving
 ; %tmp4 a lower scalarization overhead.
 ;
 ; COST-LABEL:  predicated_udiv_scalarized_operand
+; COST:        LV: Found an estimated cost of 5 for VF 2 For instruction: %tmp4 = udiv i64 %tmp2, %tmp3
----------------
The comment for the test explicitly says we need cost of 4 here.


================
Comment at: llvm/test/Transforms/LoopVectorize/AArch64/extractvalue-no-scalarization-required.ll:11
 
-; CM: LV: Scalar loop costs: 7.
+; CM: LV: Scalar loop costs: 9.
 ; CM: LV: Found an estimated cost of 5 for VF 2 For instruction:   %a = extractvalue { i64, i64 } %sv, 0
----------------
It is not clear why these costs (with same changes below) are increased


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D79164/new/

https://reviews.llvm.org/D79164





More information about the llvm-commits mailing list