[PATCH] D74976: [CostModel][X86] Improve extract/insert element costs (PR43605)
Roman Lebedev via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Feb 26 06:36:26 PST 2020
lebedev.ri marked an inline comment as done.
lebedev.ri added a comment.
Thanks, no further comments, this looks about reasonable to me.
================
Comment at: llvm/test/Analysis/CostModel/X86/vector-extract.ll:41
+; AVX-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v8f64_3 = extractelement <8 x double> undef, i32 3
; AVX-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %v8f64_4 = extractelement <8 x double> undef, i32 4
+; AVX-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v8f64_7 = extractelement <8 x double> undef, i32 7
----------------
RKSimon wrote:
> lebedev.ri wrote:
> > Hm, why is this cost=0, don't we need to extract 3'th sub-register here?
> AVX1/2 - this will legalize to 2 * <4 x double> to fit into ymm registers, so its already at index0 of the 2nd <4 x double>
Right.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D74976/new/
https://reviews.llvm.org/D74976
More information about the llvm-commits
mailing list