[PATCH] D111960: [X86][AVX] Prefer VINSERTF128 over VPERM2F128 for 128->256 subvector concatenations
Phoebe Wang via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Oct 29 06:33:02 PDT 2021
pengfei accepted this revision.
pengfei added a comment.
This revision is now accepted and ready to land.
LGTM.
================
Comment at: llvm/lib/Target/X86/X86ISelLowering.cpp:36871
// TODO: Add AVX2 support instead of VPERMQ/VPERMPD.
- if (Mask[0] == 0 && Mask[1] == 0 && !Subtarget.hasAVX2()) {
+ if (BaseMask[0] == 0 && (BaseMask[1] == 0 || BaseMask[1] == 2) &&
+ !Subtarget.hasAVX2()) {
----------------
Ending with space.
================
Comment at: llvm/lib/Target/X86/X86InstrSSE.td:7136-7137
let Predicates = [HasAVX, NoVLX] in {
- defm : vinsert_lowering<"VINSERTF128", v4f32, v8f32, loadv4f32>;
- defm : vinsert_lowering<"VINSERTF128", v2f64, v4f64, loadv2f64>;
+ defm : vinsert_lowering<"VINSERTF128", "VPERM2F128", v4f32, v8f32, loadv4f32, loadv8f32>;
+ defm : vinsert_lowering<"VINSERTF128", "VPERM2F128", v2f64, v4f64, loadv2f64, loadv4f64>;
}
----------------
So these patterns are not used in this patch?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D111960/new/
https://reviews.llvm.org/D111960
More information about the llvm-commits
mailing list