Need to include the cost of the initial insertelement to the cost of the
broadcasts. Also, need to adjust the cost of the gather/buildvector if
the element is ionserted into poison/undef vector.
Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
llvm/lib/Target/X86/X86TargetTransformInfo.h | ||
---|---|---|
152 | How much work to avoid the default values on all the target impl? We don't do the same for Index. |
llvm/lib/Target/X86/X86TargetTransformInfo.cpp | ||
---|---|---|
4354 | constang -> constant | |
4355 | Switch order in case Op1 is null: if ( isa_and_nonnull<Constant>(Op1) && Op1->getType()->isIntegerTy()) | |
llvm/test/Analysis/CostModel/X86/vector-insert-inseltpoison.ll | ||
297 | Something is still wrong - you have a more expensive cost to insert a i64 into [0] than [1] - for SSE4 they should both be cost = 1 |
llvm/lib/Target/X86/X86TargetTransformInfo.cpp | ||
---|---|---|
4374 | Should this comment also be removed? It seems like the code has been removed? |
llvm/lib/Target/X86/X86TargetTransformInfo.cpp | ||
---|---|---|
4374 | No, it is not removed, the related code is all in the same lambda IsCheapPInsrPExtrInsertPS |
llvm/lib/Target/X86/X86TargetTransformInfo.cpp | ||
---|---|---|
4374 | Ah, but it documents the logic in the helper function now, which is used in multiple places. Should it not be moved there? Also, shouldn't the 2 sentences be merged? At the moment, the wording seems to imply that pinsr/pextr XMM <-> GPR is relatively cheap on all targets AND insertps is relatively cheap on all targets., whereas it should be OR? |
llvm/lib/Target/X86/X86TargetTransformInfo.cpp | ||
---|---|---|
4374 | Ok, will move it to the lambda |
pre-commit whitespace cleanups separetely