[PATCH] D111960: [X86][AVX] Prefer VINSERTF128 over VPERM2F128 for 128->256 subvector concatenations

Simon Pilgrim via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Oct 29 06:52:38 PDT 2021


RKSimon added inline comments.


================
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>;
 }
----------------
pengfei wrote:
> So these patterns are not used in this patch?
They are used - although on AVX2 targets (down at line 7753-7756), there's no way to make use of the new 'Folding "To" vector' pattern inside vinsert_lowering for VINSERTI128, but the other patterns are still used on AVX2 targets.


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