[PATCH] D43974: [AArch64] Adjust the cost of integer vector division
Matthew Simpson via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Mar 7 13:21:14 PST 2018
mssimpso added a comment.
In https://reviews.llvm.org/D43974#1030467, @evandro wrote:
> The test case has scalar types and it seems more interesting to see the cost rising proportionally with the vector factor.
You can't really see the costs of the divisions increasing, though. Why not follow the example in bswap.ll with something like:
define <2 x i32> @sdiv_v2i32(<2 x i32> %a, <2 x i32> %b) {
; CHECK: Found an estimated cost of 8 for instruction: %tmp = sdiv <2 x i32> %a, %b
%tmp = sdiv <2 x i32> %a, %b
ret <2 x i32> %tmp
}
define <4 x i32> @sdiv_v4i32(<4 x i32> %a, <4 x i32> %b) {
; CHECK: Found an estimated cost of 22 for instruction: %tmp = sdiv <4 x i32> %a, %b
%tmp = sdiv <4 x i32> %a, %b
ret <4 x i32> %tmp
}
...
https://reviews.llvm.org/D43974
More information about the llvm-commits
mailing list