http://bugs.llvm.org/show_bug.cgi?id=32007

            Bug ID: 32007
           Summary: [X86] Should use fp broadcast instructions for
                    integers with only AVX1
           Product: libraries
           Version: trunk
          Hardware: PC
                OS: All
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: Backend: X86
          Assignee: [email protected]
          Reporter: [email protected]
                CC: [email protected]

This test case should use an fp broadcast instruction in AVX1 only mode

define <8 x i32> @load_splat_8i32_4i32_01010101(<4 x i32>* %ptr) nounwind
uwtable readnone ssp {
; SSE-LABEL: load_splat_8i32_4i32_01010101:
; SSE:       # BB#0: # %entry
; SSE-NEXT:    pshufd {{.*#+}} xmm0 = mem[0,1,0,1]
; SSE-NEXT:    movdqa %xmm0, %xmm1
; SSE-NEXT:    retq
;
; AVX1-LABEL: load_splat_8i32_4i32_01010101:
; AVX1:       # BB#0: # %entry
; AVX1-NEXT:    vpshufd {{.*#+}} xmm0 = mem[0,1,0,1]
; AVX1-NEXT:    vinsertf128 $1, %xmm0, %ymm0, %ymm0
; AVX1-NEXT:    retq
;
; AVX2-LABEL: load_splat_8i32_4i32_01010101:
; AVX2:       # BB#0: # %entry
; AVX2-NEXT:    vbroadcastsd (%rdi), %ymm0

; AVX2-NEXT:    retq
;
; AVX512-LABEL: load_splat_8i32_4i32_01010101:
; AVX512:       # BB#0: # %entry
; AVX512-NEXT:    vbroadcastsd (%rdi), %ymm0

; AVX512-NEXT:    retq
entry:
  %ld = load <4 x i32>, <4 x i32>* %ptr
  %ret = shufflevector <4 x i32> %ld, <4 x i32> undef, <8 x i32> <i32 0, i32 1,
i32 0, i32 1, i32 0, i32 1, i32 0, i32 1>
  ret <8 x i32> %ret
}

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

Reply via email to