[llvm] [X86][AVX] Add missing X86ISD::VBROADCAST(v2i64 -> v4i64) isel pattern for AVX1 targets (PR #102853)

Simon Pilgrim via llvm-commits llvm-commits at lists.llvm.org
Mon Aug 12 01:07:25 PDT 2024


================
@@ -7797,6 +7797,11 @@ let Predicates = [HasAVX1Only] in {
             (VPSHUFDri (VMOV64toPQIrr GR64:$src), 0x44)>;
   def : Pat<(v2i64 (X86VBroadcastld64 addr:$src)),
             (VMOVDDUPrm addr:$src)>;
+
+  def : Pat<(v4i64 (X86VBroadcast v2i64:$src)),
+            (VINSERTF128rr (INSERT_SUBREG (v4i64 (IMPLICIT_DEF)),
+              (v2i64 (VMOVDDUPrr VR128:$src)), sub_xmm),
+              (v2i64 (VMOVDDUPrr VR128:$src)), 1)>;
----------------
RKSimon wrote:

Use VPSHUFDri 0x44 instead to reduce domain changes?

https://github.com/llvm/llvm-project/pull/102853


More information about the llvm-commits mailing list