https://bugs.llvm.org/show_bug.cgi?id=36191

            Bug ID: 36191
           Summary: [X86][AVX512] Failure to fold broadcast into 'zmm'
                    instruction for fake xmm/ymm (NoVLX) instructions
           Product: libraries
           Version: trunk
          Hardware: PC
                OS: Windows NT
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: Backend: X86
          Assignee: unassignedb...@nondot.org
          Reporter: llvm-...@redking.me.uk
                CC: craig.top...@gmail.com, llvm-bugs@lists.llvm.org,
                    zvi.racko...@intel.com

define <4 x i64> @mul_19(<4 x i64>) {
  %2 = mul <4 x i64> %0, <i64 19, i64 19, i64 19, i64 19>
  ret <4 x i64> %2
}

Without AVX512VL, we cheat and perform many AVX512 xmm/ymm instructions on the
ZMM register. Unfortunately we fail to fold broadcast loads into these,
increasing register pressure:

llc -mattr=+avx512dq,+avx512vl

.LCPI0_0:
  .quad 19 # 0x13
_Z6mul_19Dv4_x: # @_Z6mul_19Dv4_x
  vpmullq .LCPI0_0(%rip){1to4}, %ymm0, %ymm0
  retq

llc -mattr=+avx512dq

.LCPI0_0:
  .quad 19 # 0x13
_Z6mul_19Dv4_x: # @_Z6mul_19Dv4_x
  vpbroadcastq .LCPI0_0(%rip), %ymm1 # ymm1 = [19,19,19,19]
  vpmullq %zmm1, %zmm0, %zmm0
  retq

-- 
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to