[PATCH] D107541: [AArch64] Cost-model vector concatenation

David Sherwood via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Aug 6 08:02:47 PDT 2021


david-arm added inline comments.


================
Comment at: llvm/test/Analysis/CostModel/AArch64/sve-intrinsics.ll:7
+; CHECK-NEXT:  Cost Model: Found an estimated cost of 72 for instruction: %extract_fixed_from_scalable = call <16 x i32> @llvm.experimental.vector.extract.v16i32.nxv4i32(<vscale x 4 x i32> %v0, i64 0)
+; CHECK-NEXT:  Cost Model: Found an estimated cost of 4 for instruction: %insert_fixed_into_scalable = call <vscale x 4 x i32> @llvm.experimental.vector.insert.nxv4i32.v16i32(<vscale x 4 x i32> %v0, <16 x i32> %v2, i64 0)
+; CHECK-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %extract_scalable_from_scalable = call <vscale x 4 x i32> @llvm.experimental.vector.extract.nxv4i32.nxv16i32(<vscale x 16 x i32> %v1, i64 0)
----------------
SjoerdMeijer wrote:
> I have just reran the script, but this is the only real change in this test.
The cost for this looks very optimistic judging by the codegen as I can see around 30 instructions generated! Not sure why this has changed as I'd have expected an assert to fire in getVectorNumElements for scalable vectors.


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

https://reviews.llvm.org/D107541



More information about the llvm-commits mailing list