llvm/llvm/test/CodeGen/X86/pr48727.ll

; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
; RUN: llc < %s -mtriple=x86_64-- -mcpu=skx | FileCheck %s

define void @PR48727() {
; CHECK-LABEL: PR48727:
; CHECK:       # %bb.0: # %entry
; CHECK-NEXT:    vcvttpd2dqy 0, %xmm0
; CHECK-NEXT:    vcvttpd2dqy 128, %xmm1
; CHECK-NEXT:    movq (%rax), %rax
; CHECK-NEXT:    vcvttpd2dqy 160, %xmm2
; CHECK-NEXT:    vinserti128 $1, %xmm2, %ymm1, %ymm1
; CHECK-NEXT:    vcvttpd2dqy (%rax), %xmm2
; CHECK-NEXT:    vinserti128 $1, %xmm2, %ymm0, %ymm0
; CHECK-NEXT:    vinserti64x4 $1, %ymm1, %zmm0, %zmm0
; CHECK-NEXT:    vpmovdw %zmm0, %ymm0
; CHECK-NEXT:    vmovdqu %ymm0, 16(%rax)
; CHECK-NEXT:    vzeroupper
; CHECK-NEXT:    retq
entry:
  %0 = load ptr, ptr undef, align 8
  %wide.load.2 = load <4 x double>, ptr null, align 16
  %1 = fptosi <4 x double> %wide.load.2 to <4 x i16>
  %2 = getelementptr inbounds [100 x [100 x i16]], ptr %0, i64 0, i64 0, i64 8
  store <4 x i16> %1, ptr %2, align 8
  %wide.load.3 = load <4 x double>, ptr undef, align 16, !invariant.load !0, !noalias !1
  %3 = fptosi <4 x double> %wide.load.3 to <4 x i16>
  %4 = getelementptr inbounds [100 x [100 x i16]], ptr %0, i64 0, i64 0, i64 12
  store <4 x i16> %3, ptr %4, align 8
  %5 = getelementptr inbounds [100 x [100 x double]], ptr null, i64 0, i64 0, i64 16
  %wide.load.4 = load <4 x double>, ptr %5, align 16, !invariant.load !0, !noalias !1
  %6 = fptosi <4 x double> %wide.load.4 to <4 x i16>
  %7 = getelementptr inbounds [100 x [100 x i16]], ptr %0, i64 0, i64 0, i64 16
  store <4 x i16> %6, ptr %7, align 8
  %8 = getelementptr inbounds [100 x [100 x double]], ptr null, i64 0, i64 0, i64 20
  %wide.load.5 = load <4 x double>, ptr %8, align 16, !invariant.load !0, !noalias !1
  %9 = fptosi <4 x double> %wide.load.5 to <4 x i16>
  %10 = getelementptr inbounds [100 x [100 x i16]], ptr %0, i64 0, i64 0, i64 20
  store <4 x i16> %9, ptr %10, align 8
  ret void
}

!0 = !{}
!1 = !{!2}
!2 = !{!"buffer: {index:1, offset:0, size:20000}", !3}
!3 = !{!"XLA global AA domain"}