; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
; RUN: opt < %s -mtriple=x86_64-unknown -passes=slp-vectorizer -S -mcpu=x86-64 | FileCheck %s --check-prefixes=CHECK,SCALAR
; RUN: opt < %s -mtriple=x86_64-unknown -passes=slp-vectorizer -S -mcpu=x86-64-v2 -mattr=+prefer-128-bit | FileCheck %s --check-prefixes=CHECK,VEC128
; RUN: opt < %s -mtriple=x86_64-unknown -passes=slp-vectorizer -S -mcpu=x86-64-v2 -mattr=-prefer-128-bit | FileCheck %s --check-prefixes=CHECK,VEC128
; RUN: opt < %s -mtriple=x86_64-unknown -passes=slp-vectorizer -S -mcpu=x86-64-v3 -mattr=+prefer-128-bit | FileCheck %s --check-prefixes=CHECK,VEC128
; RUN: opt < %s -mtriple=x86_64-unknown -passes=slp-vectorizer -S -mcpu=x86-64-v3 -mattr=-prefer-128-bit | FileCheck %s --check-prefixes=CHECK,VEC256,VEC256-AVX2
; RUN: opt < %s -mtriple=x86_64-unknown -passes=slp-vectorizer -S -mcpu=x86-64-v4 -mattr=+prefer-256-bit | FileCheck %s --check-prefixes=CHECK,VEC256,VEC256-AVX512
; RUN: opt < %s -mtriple=x86_64-unknown -passes=slp-vectorizer -S -mcpu=x86-64-v4 -mattr=-prefer-256-bit | FileCheck %s --check-prefixes=CHECK,VEC512
@f64 = common global [16 x double] zeroinitializer, align 64
@f32 = common global [16 x float] zeroinitializer, align 64
@r64 = common global [16 x i64] zeroinitializer, align 64
@r32 = common global [16 x i32] zeroinitializer, align 64
define void @rint_v8f32_v8f32() {
; SCALAR-LABEL: @rint_v8f32_v8f32(
; SCALAR-NEXT: [[A0:%.*]] = load float, ptr @f32, align 8
; SCALAR-NEXT: [[A1:%.*]] = load float, ptr getelementptr inbounds ([8 x float], ptr @f32, i32 0, i32 1), align 8
; SCALAR-NEXT: [[A2:%.*]] = load float, ptr getelementptr inbounds ([8 x float], ptr @f32, i32 0, i32 2), align 8
; SCALAR-NEXT: [[A3:%.*]] = load float, ptr getelementptr inbounds ([8 x float], ptr @f32, i32 0, i32 3), align 8
; SCALAR-NEXT: [[A4:%.*]] = load float, ptr getelementptr inbounds ([8 x float], ptr @f32, i32 0, i32 4), align 8
; SCALAR-NEXT: [[A5:%.*]] = load float, ptr getelementptr inbounds ([8 x float], ptr @f32, i32 0, i32 5), align 8
; SCALAR-NEXT: [[A6:%.*]] = load float, ptr getelementptr inbounds ([8 x float], ptr @f32, i32 0, i32 6), align 8
; SCALAR-NEXT: [[A7:%.*]] = load float, ptr getelementptr inbounds ([8 x float], ptr @f32, i32 0, i32 7), align 8
; SCALAR-NEXT: [[R0:%.*]] = call float @llvm.rint.f32(float [[A0]])
; SCALAR-NEXT: [[R1:%.*]] = call float @llvm.rint.f32(float [[A1]])
; SCALAR-NEXT: [[R2:%.*]] = call float @llvm.rint.f32(float [[A2]])
; SCALAR-NEXT: [[R3:%.*]] = call float @llvm.rint.f32(float [[A3]])
; SCALAR-NEXT: [[R4:%.*]] = call float @llvm.rint.f32(float [[A4]])
; SCALAR-NEXT: [[R5:%.*]] = call float @llvm.rint.f32(float [[A5]])
; SCALAR-NEXT: [[R6:%.*]] = call float @llvm.rint.f32(float [[A6]])
; SCALAR-NEXT: [[R7:%.*]] = call float @llvm.rint.f32(float [[A7]])
; SCALAR-NEXT: store float [[R0]], ptr @f32, align 8
; SCALAR-NEXT: store float [[R1]], ptr getelementptr inbounds ([8 x float], ptr @f32, i32 0, i32 1), align 8
; SCALAR-NEXT: store float [[R2]], ptr getelementptr inbounds ([8 x float], ptr @f32, i32 0, i32 2), align 8
; SCALAR-NEXT: store float [[R3]], ptr getelementptr inbounds ([8 x float], ptr @f32, i32 0, i32 3), align 8
; SCALAR-NEXT: store float [[R4]], ptr getelementptr inbounds ([8 x float], ptr @f32, i32 0, i32 4), align 8
; SCALAR-NEXT: store float [[R5]], ptr getelementptr inbounds ([8 x float], ptr @f32, i32 0, i32 5), align 8
; SCALAR-NEXT: store float [[R6]], ptr getelementptr inbounds ([8 x float], ptr @f32, i32 0, i32 6), align 8
; SCALAR-NEXT: store float [[R7]], ptr getelementptr inbounds ([8 x float], ptr @f32, i32 0, i32 7), align 8
; SCALAR-NEXT: ret void
;
; VEC128-LABEL: @rint_v8f32_v8f32(
; VEC128-NEXT: [[TMP1:%.*]] = load <4 x float>, ptr @f32, align 8
; VEC128-NEXT: [[TMP2:%.*]] = call <4 x float> @llvm.rint.v4f32(<4 x float> [[TMP1]])
; VEC128-NEXT: store <4 x float> [[TMP2]], ptr @f32, align 8
; VEC128-NEXT: [[TMP3:%.*]] = load <4 x float>, ptr getelementptr inbounds ([8 x float], ptr @f32, i32 0, i32 4), align 8
; VEC128-NEXT: [[TMP4:%.*]] = call <4 x float> @llvm.rint.v4f32(<4 x float> [[TMP3]])
; VEC128-NEXT: store <4 x float> [[TMP4]], ptr getelementptr inbounds ([8 x float], ptr @f32, i32 0, i32 4), align 8
; VEC128-NEXT: ret void
;
; VEC256-LABEL: @rint_v8f32_v8f32(
; VEC256-NEXT: [[TMP1:%.*]] = load <8 x float>, ptr @f32, align 8
; VEC256-NEXT: [[TMP2:%.*]] = call <8 x float> @llvm.rint.v8f32(<8 x float> [[TMP1]])
; VEC256-NEXT: store <8 x float> [[TMP2]], ptr @f32, align 8
; VEC256-NEXT: ret void
;
; VEC512-LABEL: @rint_v8f32_v8f32(
; VEC512-NEXT: [[TMP1:%.*]] = load <8 x float>, ptr @f32, align 8
; VEC512-NEXT: [[TMP2:%.*]] = call <8 x float> @llvm.rint.v8f32(<8 x float> [[TMP1]])
; VEC512-NEXT: store <8 x float> [[TMP2]], ptr @f32, align 8
; VEC512-NEXT: ret void
;
%a0 = load float, ptr @f32, align 8
%a1 = load float, ptr getelementptr inbounds ([8 x float], ptr @f32, i32 0, i32 1), align 8
%a2 = load float, ptr getelementptr inbounds ([8 x float], ptr @f32, i32 0, i32 2), align 8
%a3 = load float, ptr getelementptr inbounds ([8 x float], ptr @f32, i32 0, i32 3), align 8
%a4 = load float, ptr getelementptr inbounds ([8 x float], ptr @f32, i32 0, i32 4), align 8
%a5 = load float, ptr getelementptr inbounds ([8 x float], ptr @f32, i32 0, i32 5), align 8
%a6 = load float, ptr getelementptr inbounds ([8 x float], ptr @f32, i32 0, i32 6), align 8
%a7 = load float, ptr getelementptr inbounds ([8 x float], ptr @f32, i32 0, i32 7), align 8
%r0 = call float @llvm.rint.i32.f32(float %a0)
%r1 = call float @llvm.rint.i32.f32(float %a1)
%r2 = call float @llvm.rint.i32.f32(float %a2)
%r3 = call float @llvm.rint.i32.f32(float %a3)
%r4 = call float @llvm.rint.i32.f32(float %a4)
%r5 = call float @llvm.rint.i32.f32(float %a5)
%r6 = call float @llvm.rint.i32.f32(float %a6)
%r7 = call float @llvm.rint.i32.f32(float %a7)
store float %r0, ptr @f32, align 8
store float %r1, ptr getelementptr inbounds ([8 x float], ptr @f32, i32 0, i32 1), align 8
store float %r2, ptr getelementptr inbounds ([8 x float], ptr @f32, i32 0, i32 2), align 8
store float %r3, ptr getelementptr inbounds ([8 x float], ptr @f32, i32 0, i32 3), align 8
store float %r4, ptr getelementptr inbounds ([8 x float], ptr @f32, i32 0, i32 4), align 8
store float %r5, ptr getelementptr inbounds ([8 x float], ptr @f32, i32 0, i32 5), align 8
store float %r6, ptr getelementptr inbounds ([8 x float], ptr @f32, i32 0, i32 6), align 8
store float %r7, ptr getelementptr inbounds ([8 x float], ptr @f32, i32 0, i32 7), align 8
ret void
}
define void @rint_v8f64_v8f64() {
; SCALAR-LABEL: @rint_v8f64_v8f64(
; SCALAR-NEXT: [[A0:%.*]] = load double, ptr @f64, align 8
; SCALAR-NEXT: [[A1:%.*]] = load double, ptr getelementptr inbounds ([8 x double], ptr @f64, i32 0, i32 1), align 8
; SCALAR-NEXT: [[A2:%.*]] = load double, ptr getelementptr inbounds ([8 x double], ptr @f64, i32 0, i32 2), align 8
; SCALAR-NEXT: [[A3:%.*]] = load double, ptr getelementptr inbounds ([8 x double], ptr @f64, i32 0, i32 3), align 8
; SCALAR-NEXT: [[A4:%.*]] = load double, ptr getelementptr inbounds ([8 x double], ptr @f64, i32 0, i32 4), align 8
; SCALAR-NEXT: [[A5:%.*]] = load double, ptr getelementptr inbounds ([8 x double], ptr @f64, i32 0, i32 5), align 8
; SCALAR-NEXT: [[A6:%.*]] = load double, ptr getelementptr inbounds ([8 x double], ptr @f64, i32 0, i32 6), align 8
; SCALAR-NEXT: [[A7:%.*]] = load double, ptr getelementptr inbounds ([8 x double], ptr @f64, i32 0, i32 7), align 8
; SCALAR-NEXT: [[R0:%.*]] = call double @llvm.rint.f64(double [[A0]])
; SCALAR-NEXT: [[R1:%.*]] = call double @llvm.rint.f64(double [[A1]])
; SCALAR-NEXT: [[R2:%.*]] = call double @llvm.rint.f64(double [[A2]])
; SCALAR-NEXT: [[R3:%.*]] = call double @llvm.rint.f64(double [[A3]])
; SCALAR-NEXT: [[R4:%.*]] = call double @llvm.rint.f64(double [[A4]])
; SCALAR-NEXT: [[R5:%.*]] = call double @llvm.rint.f64(double [[A5]])
; SCALAR-NEXT: [[R6:%.*]] = call double @llvm.rint.f64(double [[A6]])
; SCALAR-NEXT: [[R7:%.*]] = call double @llvm.rint.f64(double [[A7]])
; SCALAR-NEXT: store double [[R0]], ptr @f64, align 8
; SCALAR-NEXT: store double [[R1]], ptr getelementptr inbounds ([8 x double], ptr @f64, i32 0, i32 1), align 8
; SCALAR-NEXT: store double [[R2]], ptr getelementptr inbounds ([8 x double], ptr @f64, i32 0, i32 2), align 8
; SCALAR-NEXT: store double [[R3]], ptr getelementptr inbounds ([8 x double], ptr @f64, i32 0, i32 3), align 8
; SCALAR-NEXT: store double [[R4]], ptr getelementptr inbounds ([8 x double], ptr @f64, i32 0, i32 4), align 8
; SCALAR-NEXT: store double [[R5]], ptr getelementptr inbounds ([8 x double], ptr @f64, i32 0, i32 5), align 8
; SCALAR-NEXT: store double [[R6]], ptr getelementptr inbounds ([8 x double], ptr @f64, i32 0, i32 6), align 8
; SCALAR-NEXT: store double [[R7]], ptr getelementptr inbounds ([8 x double], ptr @f64, i32 0, i32 7), align 8
; SCALAR-NEXT: ret void
;
; VEC128-LABEL: @rint_v8f64_v8f64(
; VEC128-NEXT: [[TMP1:%.*]] = load <2 x double>, ptr @f64, align 8
; VEC128-NEXT: [[TMP2:%.*]] = call <2 x double> @llvm.rint.v2f64(<2 x double> [[TMP1]])
; VEC128-NEXT: store <2 x double> [[TMP2]], ptr @f64, align 8
; VEC128-NEXT: [[TMP3:%.*]] = load <2 x double>, ptr getelementptr inbounds ([8 x double], ptr @f64, i32 0, i32 2), align 8
; VEC128-NEXT: [[TMP4:%.*]] = call <2 x double> @llvm.rint.v2f64(<2 x double> [[TMP3]])
; VEC128-NEXT: store <2 x double> [[TMP4]], ptr getelementptr inbounds ([8 x double], ptr @f64, i32 0, i32 2), align 8
; VEC128-NEXT: [[TMP5:%.*]] = load <2 x double>, ptr getelementptr inbounds ([8 x double], ptr @f64, i32 0, i32 4), align 8
; VEC128-NEXT: [[TMP6:%.*]] = call <2 x double> @llvm.rint.v2f64(<2 x double> [[TMP5]])
; VEC128-NEXT: store <2 x double> [[TMP6]], ptr getelementptr inbounds ([8 x double], ptr @f64, i32 0, i32 4), align 8
; VEC128-NEXT: [[TMP7:%.*]] = load <2 x double>, ptr getelementptr inbounds ([8 x double], ptr @f64, i32 0, i32 6), align 8
; VEC128-NEXT: [[TMP8:%.*]] = call <2 x double> @llvm.rint.v2f64(<2 x double> [[TMP7]])
; VEC128-NEXT: store <2 x double> [[TMP8]], ptr getelementptr inbounds ([8 x double], ptr @f64, i32 0, i32 6), align 8
; VEC128-NEXT: ret void
;
; VEC256-LABEL: @rint_v8f64_v8f64(
; VEC256-NEXT: [[TMP1:%.*]] = load <4 x double>, ptr @f64, align 8
; VEC256-NEXT: [[TMP2:%.*]] = call <4 x double> @llvm.rint.v4f64(<4 x double> [[TMP1]])
; VEC256-NEXT: store <4 x double> [[TMP2]], ptr @f64, align 8
; VEC256-NEXT: [[TMP3:%.*]] = load <4 x double>, ptr getelementptr inbounds ([8 x double], ptr @f64, i32 0, i32 4), align 8
; VEC256-NEXT: [[TMP4:%.*]] = call <4 x double> @llvm.rint.v4f64(<4 x double> [[TMP3]])
; VEC256-NEXT: store <4 x double> [[TMP4]], ptr getelementptr inbounds ([8 x double], ptr @f64, i32 0, i32 4), align 8
; VEC256-NEXT: ret void
;
; VEC512-LABEL: @rint_v8f64_v8f64(
; VEC512-NEXT: [[TMP1:%.*]] = load <8 x double>, ptr @f64, align 8
; VEC512-NEXT: [[TMP2:%.*]] = call <8 x double> @llvm.rint.v8f64(<8 x double> [[TMP1]])
; VEC512-NEXT: store <8 x double> [[TMP2]], ptr @f64, align 8
; VEC512-NEXT: ret void
;
%a0 = load double, ptr @f64, align 8
%a1 = load double, ptr getelementptr inbounds ([8 x double], ptr @f64, i32 0, i32 1), align 8
%a2 = load double, ptr getelementptr inbounds ([8 x double], ptr @f64, i32 0, i32 2), align 8
%a3 = load double, ptr getelementptr inbounds ([8 x double], ptr @f64, i32 0, i32 3), align 8
%a4 = load double, ptr getelementptr inbounds ([8 x double], ptr @f64, i32 0, i32 4), align 8
%a5 = load double, ptr getelementptr inbounds ([8 x double], ptr @f64, i32 0, i32 5), align 8
%a6 = load double, ptr getelementptr inbounds ([8 x double], ptr @f64, i32 0, i32 6), align 8
%a7 = load double, ptr getelementptr inbounds ([8 x double], ptr @f64, i32 0, i32 7), align 8
%r0 = call double @llvm.rint.f64.f64(double %a0)
%r1 = call double @llvm.rint.f64.f64(double %a1)
%r2 = call double @llvm.rint.f64.f64(double %a2)
%r3 = call double @llvm.rint.f64.f64(double %a3)
%r4 = call double @llvm.rint.f64.f64(double %a4)
%r5 = call double @llvm.rint.f64.f64(double %a5)
%r6 = call double @llvm.rint.f64.f64(double %a6)
%r7 = call double @llvm.rint.f64.f64(double %a7)
store double %r0, ptr @f64, align 8
store double %r1, ptr getelementptr inbounds ([8 x double], ptr @f64, i32 0, i32 1), align 8
store double %r2, ptr getelementptr inbounds ([8 x double], ptr @f64, i32 0, i32 2), align 8
store double %r3, ptr getelementptr inbounds ([8 x double], ptr @f64, i32 0, i32 3), align 8
store double %r4, ptr getelementptr inbounds ([8 x double], ptr @f64, i32 0, i32 4), align 8
store double %r5, ptr getelementptr inbounds ([8 x double], ptr @f64, i32 0, i32 5), align 8
store double %r6, ptr getelementptr inbounds ([8 x double], ptr @f64, i32 0, i32 6), align 8
store double %r7, ptr getelementptr inbounds ([8 x double], ptr @f64, i32 0, i32 7), align 8
ret void
}
define void @lrint_v8f32_v8i32() {
; SCALAR-LABEL: @lrint_v8f32_v8i32(
; SCALAR-NEXT: [[TMP1:%.*]] = load <4 x float>, ptr @f32, align 8
; SCALAR-NEXT: [[TMP2:%.*]] = call <4 x i32> @llvm.lrint.v4i32.v4f32(<4 x float> [[TMP1]])
; SCALAR-NEXT: store <4 x i32> [[TMP2]], ptr @r32, align 8
; SCALAR-NEXT: [[TMP3:%.*]] = load <4 x float>, ptr getelementptr inbounds ([8 x float], ptr @f32, i32 0, i32 4), align 8
; SCALAR-NEXT: [[TMP4:%.*]] = call <4 x i32> @llvm.lrint.v4i32.v4f32(<4 x float> [[TMP3]])
; SCALAR-NEXT: store <4 x i32> [[TMP4]], ptr getelementptr inbounds ([8 x i32], ptr @r32, i32 0, i32 4), align 8
; SCALAR-NEXT: ret void
;
; VEC128-LABEL: @lrint_v8f32_v8i32(
; VEC128-NEXT: [[TMP1:%.*]] = load <4 x float>, ptr @f32, align 8
; VEC128-NEXT: [[TMP2:%.*]] = call <4 x i32> @llvm.lrint.v4i32.v4f32(<4 x float> [[TMP1]])
; VEC128-NEXT: store <4 x i32> [[TMP2]], ptr @r32, align 8
; VEC128-NEXT: [[TMP3:%.*]] = load <4 x float>, ptr getelementptr inbounds ([8 x float], ptr @f32, i32 0, i32 4), align 8
; VEC128-NEXT: [[TMP4:%.*]] = call <4 x i32> @llvm.lrint.v4i32.v4f32(<4 x float> [[TMP3]])
; VEC128-NEXT: store <4 x i32> [[TMP4]], ptr getelementptr inbounds ([8 x i32], ptr @r32, i32 0, i32 4), align 8
; VEC128-NEXT: ret void
;
; VEC256-LABEL: @lrint_v8f32_v8i32(
; VEC256-NEXT: [[TMP1:%.*]] = load <8 x float>, ptr @f32, align 8
; VEC256-NEXT: [[TMP2:%.*]] = call <8 x i32> @llvm.lrint.v8i32.v8f32(<8 x float> [[TMP1]])
; VEC256-NEXT: store <8 x i32> [[TMP2]], ptr @r32, align 8
; VEC256-NEXT: ret void
;
; VEC512-LABEL: @lrint_v8f32_v8i32(
; VEC512-NEXT: [[TMP1:%.*]] = load <8 x float>, ptr @f32, align 8
; VEC512-NEXT: [[TMP2:%.*]] = call <8 x i32> @llvm.lrint.v8i32.v8f32(<8 x float> [[TMP1]])
; VEC512-NEXT: store <8 x i32> [[TMP2]], ptr @r32, align 8
; VEC512-NEXT: ret void
;
%a0 = load float, ptr @f32, align 8
%a1 = load float, ptr getelementptr inbounds ([8 x float], ptr @f32, i32 0, i32 1), align 8
%a2 = load float, ptr getelementptr inbounds ([8 x float], ptr @f32, i32 0, i32 2), align 8
%a3 = load float, ptr getelementptr inbounds ([8 x float], ptr @f32, i32 0, i32 3), align 8
%a4 = load float, ptr getelementptr inbounds ([8 x float], ptr @f32, i32 0, i32 4), align 8
%a5 = load float, ptr getelementptr inbounds ([8 x float], ptr @f32, i32 0, i32 5), align 8
%a6 = load float, ptr getelementptr inbounds ([8 x float], ptr @f32, i32 0, i32 6), align 8
%a7 = load float, ptr getelementptr inbounds ([8 x float], ptr @f32, i32 0, i32 7), align 8
%r0 = call i32 @llvm.lrint.i32.f32(float %a0)
%r1 = call i32 @llvm.lrint.i32.f32(float %a1)
%r2 = call i32 @llvm.lrint.i32.f32(float %a2)
%r3 = call i32 @llvm.lrint.i32.f32(float %a3)
%r4 = call i32 @llvm.lrint.i32.f32(float %a4)
%r5 = call i32 @llvm.lrint.i32.f32(float %a5)
%r6 = call i32 @llvm.lrint.i32.f32(float %a6)
%r7 = call i32 @llvm.lrint.i32.f32(float %a7)
store i32 %r0, ptr @r32, align 8
store i32 %r1, ptr getelementptr inbounds ([8 x i32], ptr @r32, i32 0, i32 1), align 8
store i32 %r2, ptr getelementptr inbounds ([8 x i32], ptr @r32, i32 0, i32 2), align 8
store i32 %r3, ptr getelementptr inbounds ([8 x i32], ptr @r32, i32 0, i32 3), align 8
store i32 %r4, ptr getelementptr inbounds ([8 x i32], ptr @r32, i32 0, i32 4), align 8
store i32 %r5, ptr getelementptr inbounds ([8 x i32], ptr @r32, i32 0, i32 5), align 8
store i32 %r6, ptr getelementptr inbounds ([8 x i32], ptr @r32, i32 0, i32 6), align 8
store i32 %r7, ptr getelementptr inbounds ([8 x i32], ptr @r32, i32 0, i32 7), align 8
ret void
}
define void @lrint_v8f64_v8i32() {
; SCALAR-LABEL: @lrint_v8f64_v8i32(
; SCALAR-NEXT: [[TMP1:%.*]] = load <4 x double>, ptr @f64, align 8
; SCALAR-NEXT: [[TMP2:%.*]] = call <4 x i32> @llvm.lrint.v4i32.v4f64(<4 x double> [[TMP1]])
; SCALAR-NEXT: store <4 x i32> [[TMP2]], ptr @r32, align 8
; SCALAR-NEXT: [[TMP3:%.*]] = load <4 x double>, ptr getelementptr inbounds ([8 x double], ptr @f64, i32 0, i32 4), align 8
; SCALAR-NEXT: [[TMP4:%.*]] = call <4 x i32> @llvm.lrint.v4i32.v4f64(<4 x double> [[TMP3]])
; SCALAR-NEXT: store <4 x i32> [[TMP4]], ptr getelementptr inbounds ([8 x i32], ptr @r32, i32 0, i32 4), align 8
; SCALAR-NEXT: ret void
;
; VEC128-LABEL: @lrint_v8f64_v8i32(
; VEC128-NEXT: [[TMP1:%.*]] = load <4 x double>, ptr @f64, align 8
; VEC128-NEXT: [[TMP2:%.*]] = call <4 x i32> @llvm.lrint.v4i32.v4f64(<4 x double> [[TMP1]])
; VEC128-NEXT: store <4 x i32> [[TMP2]], ptr @r32, align 8
; VEC128-NEXT: [[TMP3:%.*]] = load <4 x double>, ptr getelementptr inbounds ([8 x double], ptr @f64, i32 0, i32 4), align 8
; VEC128-NEXT: [[TMP4:%.*]] = call <4 x i32> @llvm.lrint.v4i32.v4f64(<4 x double> [[TMP3]])
; VEC128-NEXT: store <4 x i32> [[TMP4]], ptr getelementptr inbounds ([8 x i32], ptr @r32, i32 0, i32 4), align 8
; VEC128-NEXT: ret void
;
; VEC256-LABEL: @lrint_v8f64_v8i32(
; VEC256-NEXT: [[TMP1:%.*]] = load <8 x double>, ptr @f64, align 8
; VEC256-NEXT: [[TMP2:%.*]] = call <8 x i32> @llvm.lrint.v8i32.v8f64(<8 x double> [[TMP1]])
; VEC256-NEXT: store <8 x i32> [[TMP2]], ptr @r32, align 8
; VEC256-NEXT: ret void
;
; VEC512-LABEL: @lrint_v8f64_v8i32(
; VEC512-NEXT: [[TMP1:%.*]] = load <8 x double>, ptr @f64, align 8
; VEC512-NEXT: [[TMP2:%.*]] = call <8 x i32> @llvm.lrint.v8i32.v8f64(<8 x double> [[TMP1]])
; VEC512-NEXT: store <8 x i32> [[TMP2]], ptr @r32, align 8
; VEC512-NEXT: ret void
;
%a0 = load double, ptr @f64, align 8
%a1 = load double, ptr getelementptr inbounds ([8 x double], ptr @f64, i32 0, i32 1), align 8
%a2 = load double, ptr getelementptr inbounds ([8 x double], ptr @f64, i32 0, i32 2), align 8
%a3 = load double, ptr getelementptr inbounds ([8 x double], ptr @f64, i32 0, i32 3), align 8
%a4 = load double, ptr getelementptr inbounds ([8 x double], ptr @f64, i32 0, i32 4), align 8
%a5 = load double, ptr getelementptr inbounds ([8 x double], ptr @f64, i32 0, i32 5), align 8
%a6 = load double, ptr getelementptr inbounds ([8 x double], ptr @f64, i32 0, i32 6), align 8
%a7 = load double, ptr getelementptr inbounds ([8 x double], ptr @f64, i32 0, i32 7), align 8
%r0 = call i32 @llvm.lrint.i32.f64(double %a0)
%r1 = call i32 @llvm.lrint.i32.f64(double %a1)
%r2 = call i32 @llvm.lrint.i32.f64(double %a2)
%r3 = call i32 @llvm.lrint.i32.f64(double %a3)
%r4 = call i32 @llvm.lrint.i32.f64(double %a4)
%r5 = call i32 @llvm.lrint.i32.f64(double %a5)
%r6 = call i32 @llvm.lrint.i32.f64(double %a6)
%r7 = call i32 @llvm.lrint.i32.f64(double %a7)
store i32 %r0, ptr @r32, align 8
store i32 %r1, ptr getelementptr inbounds ([8 x i32], ptr @r32, i32 0, i32 1), align 8
store i32 %r2, ptr getelementptr inbounds ([8 x i32], ptr @r32, i32 0, i32 2), align 8
store i32 %r3, ptr getelementptr inbounds ([8 x i32], ptr @r32, i32 0, i32 3), align 8
store i32 %r4, ptr getelementptr inbounds ([8 x i32], ptr @r32, i32 0, i32 4), align 8
store i32 %r5, ptr getelementptr inbounds ([8 x i32], ptr @r32, i32 0, i32 5), align 8
store i32 %r6, ptr getelementptr inbounds ([8 x i32], ptr @r32, i32 0, i32 6), align 8
store i32 %r7, ptr getelementptr inbounds ([8 x i32], ptr @r32, i32 0, i32 7), align 8
ret void
}
define void @llrint_v8f32_v8i64() {
; SCALAR-LABEL: @llrint_v8f32_v8i64(
; SCALAR-NEXT: [[A0:%.*]] = load float, ptr @f32, align 8
; SCALAR-NEXT: [[A1:%.*]] = load float, ptr getelementptr inbounds ([8 x float], ptr @f32, i32 0, i32 1), align 8
; SCALAR-NEXT: [[A2:%.*]] = load float, ptr getelementptr inbounds ([8 x float], ptr @f32, i32 0, i32 2), align 8
; SCALAR-NEXT: [[A3:%.*]] = load float, ptr getelementptr inbounds ([8 x float], ptr @f32, i32 0, i32 3), align 8
; SCALAR-NEXT: [[A4:%.*]] = load float, ptr getelementptr inbounds ([8 x float], ptr @f32, i32 0, i32 4), align 8
; SCALAR-NEXT: [[A5:%.*]] = load float, ptr getelementptr inbounds ([8 x float], ptr @f32, i32 0, i32 5), align 8
; SCALAR-NEXT: [[A6:%.*]] = load float, ptr getelementptr inbounds ([8 x float], ptr @f32, i32 0, i32 6), align 8
; SCALAR-NEXT: [[A7:%.*]] = load float, ptr getelementptr inbounds ([8 x float], ptr @f32, i32 0, i32 7), align 8
; SCALAR-NEXT: [[R0:%.*]] = call i64 @llvm.llrint.i64.f32(float [[A0]])
; SCALAR-NEXT: [[R1:%.*]] = call i64 @llvm.llrint.i64.f32(float [[A1]])
; SCALAR-NEXT: [[R2:%.*]] = call i64 @llvm.llrint.i64.f32(float [[A2]])
; SCALAR-NEXT: [[R3:%.*]] = call i64 @llvm.llrint.i64.f32(float [[A3]])
; SCALAR-NEXT: [[R4:%.*]] = call i64 @llvm.llrint.i64.f32(float [[A4]])
; SCALAR-NEXT: [[R5:%.*]] = call i64 @llvm.llrint.i64.f32(float [[A5]])
; SCALAR-NEXT: [[R6:%.*]] = call i64 @llvm.llrint.i64.f32(float [[A6]])
; SCALAR-NEXT: [[R7:%.*]] = call i64 @llvm.llrint.i64.f32(float [[A7]])
; SCALAR-NEXT: store i64 [[R0]], ptr @r64, align 8
; SCALAR-NEXT: store i64 [[R1]], ptr getelementptr inbounds ([8 x i64], ptr @r64, i32 0, i32 1), align 8
; SCALAR-NEXT: store i64 [[R2]], ptr getelementptr inbounds ([8 x i64], ptr @r64, i32 0, i32 2), align 8
; SCALAR-NEXT: store i64 [[R3]], ptr getelementptr inbounds ([8 x i64], ptr @r64, i32 0, i32 3), align 8
; SCALAR-NEXT: store i64 [[R4]], ptr getelementptr inbounds ([8 x i64], ptr @r64, i32 0, i32 4), align 8
; SCALAR-NEXT: store i64 [[R5]], ptr getelementptr inbounds ([8 x i64], ptr @r64, i32 0, i32 5), align 8
; SCALAR-NEXT: store i64 [[R6]], ptr getelementptr inbounds ([8 x i64], ptr @r64, i32 0, i32 6), align 8
; SCALAR-NEXT: store i64 [[R7]], ptr getelementptr inbounds ([8 x i64], ptr @r64, i32 0, i32 7), align 8
; SCALAR-NEXT: ret void
;
; VEC128-LABEL: @llrint_v8f32_v8i64(
; VEC128-NEXT: [[A0:%.*]] = load float, ptr @f32, align 8
; VEC128-NEXT: [[A1:%.*]] = load float, ptr getelementptr inbounds ([8 x float], ptr @f32, i32 0, i32 1), align 8
; VEC128-NEXT: [[A2:%.*]] = load float, ptr getelementptr inbounds ([8 x float], ptr @f32, i32 0, i32 2), align 8
; VEC128-NEXT: [[A3:%.*]] = load float, ptr getelementptr inbounds ([8 x float], ptr @f32, i32 0, i32 3), align 8
; VEC128-NEXT: [[A4:%.*]] = load float, ptr getelementptr inbounds ([8 x float], ptr @f32, i32 0, i32 4), align 8
; VEC128-NEXT: [[A5:%.*]] = load float, ptr getelementptr inbounds ([8 x float], ptr @f32, i32 0, i32 5), align 8
; VEC128-NEXT: [[A6:%.*]] = load float, ptr getelementptr inbounds ([8 x float], ptr @f32, i32 0, i32 6), align 8
; VEC128-NEXT: [[A7:%.*]] = load float, ptr getelementptr inbounds ([8 x float], ptr @f32, i32 0, i32 7), align 8
; VEC128-NEXT: [[R0:%.*]] = call i64 @llvm.llrint.i64.f32(float [[A0]])
; VEC128-NEXT: [[R1:%.*]] = call i64 @llvm.llrint.i64.f32(float [[A1]])
; VEC128-NEXT: [[R2:%.*]] = call i64 @llvm.llrint.i64.f32(float [[A2]])
; VEC128-NEXT: [[R3:%.*]] = call i64 @llvm.llrint.i64.f32(float [[A3]])
; VEC128-NEXT: [[R4:%.*]] = call i64 @llvm.llrint.i64.f32(float [[A4]])
; VEC128-NEXT: [[R5:%.*]] = call i64 @llvm.llrint.i64.f32(float [[A5]])
; VEC128-NEXT: [[R6:%.*]] = call i64 @llvm.llrint.i64.f32(float [[A6]])
; VEC128-NEXT: [[R7:%.*]] = call i64 @llvm.llrint.i64.f32(float [[A7]])
; VEC128-NEXT: store i64 [[R0]], ptr @r64, align 8
; VEC128-NEXT: store i64 [[R1]], ptr getelementptr inbounds ([8 x i64], ptr @r64, i32 0, i32 1), align 8
; VEC128-NEXT: store i64 [[R2]], ptr getelementptr inbounds ([8 x i64], ptr @r64, i32 0, i32 2), align 8
; VEC128-NEXT: store i64 [[R3]], ptr getelementptr inbounds ([8 x i64], ptr @r64, i32 0, i32 3), align 8
; VEC128-NEXT: store i64 [[R4]], ptr getelementptr inbounds ([8 x i64], ptr @r64, i32 0, i32 4), align 8
; VEC128-NEXT: store i64 [[R5]], ptr getelementptr inbounds ([8 x i64], ptr @r64, i32 0, i32 5), align 8
; VEC128-NEXT: store i64 [[R6]], ptr getelementptr inbounds ([8 x i64], ptr @r64, i32 0, i32 6), align 8
; VEC128-NEXT: store i64 [[R7]], ptr getelementptr inbounds ([8 x i64], ptr @r64, i32 0, i32 7), align 8
; VEC128-NEXT: ret void
;
; VEC256-AVX2-LABEL: @llrint_v8f32_v8i64(
; VEC256-AVX2-NEXT: [[A0:%.*]] = load float, ptr @f32, align 8
; VEC256-AVX2-NEXT: [[A1:%.*]] = load float, ptr getelementptr inbounds ([8 x float], ptr @f32, i32 0, i32 1), align 8
; VEC256-AVX2-NEXT: [[A2:%.*]] = load float, ptr getelementptr inbounds ([8 x float], ptr @f32, i32 0, i32 2), align 8
; VEC256-AVX2-NEXT: [[A3:%.*]] = load float, ptr getelementptr inbounds ([8 x float], ptr @f32, i32 0, i32 3), align 8
; VEC256-AVX2-NEXT: [[A4:%.*]] = load float, ptr getelementptr inbounds ([8 x float], ptr @f32, i32 0, i32 4), align 8
; VEC256-AVX2-NEXT: [[A5:%.*]] = load float, ptr getelementptr inbounds ([8 x float], ptr @f32, i32 0, i32 5), align 8
; VEC256-AVX2-NEXT: [[A6:%.*]] = load float, ptr getelementptr inbounds ([8 x float], ptr @f32, i32 0, i32 6), align 8
; VEC256-AVX2-NEXT: [[A7:%.*]] = load float, ptr getelementptr inbounds ([8 x float], ptr @f32, i32 0, i32 7), align 8
; VEC256-AVX2-NEXT: [[R0:%.*]] = call i64 @llvm.llrint.i64.f32(float [[A0]])
; VEC256-AVX2-NEXT: [[R1:%.*]] = call i64 @llvm.llrint.i64.f32(float [[A1]])
; VEC256-AVX2-NEXT: [[R2:%.*]] = call i64 @llvm.llrint.i64.f32(float [[A2]])
; VEC256-AVX2-NEXT: [[R3:%.*]] = call i64 @llvm.llrint.i64.f32(float [[A3]])
; VEC256-AVX2-NEXT: [[R4:%.*]] = call i64 @llvm.llrint.i64.f32(float [[A4]])
; VEC256-AVX2-NEXT: [[R5:%.*]] = call i64 @llvm.llrint.i64.f32(float [[A5]])
; VEC256-AVX2-NEXT: [[R6:%.*]] = call i64 @llvm.llrint.i64.f32(float [[A6]])
; VEC256-AVX2-NEXT: [[R7:%.*]] = call i64 @llvm.llrint.i64.f32(float [[A7]])
; VEC256-AVX2-NEXT: store i64 [[R0]], ptr @r64, align 8
; VEC256-AVX2-NEXT: store i64 [[R1]], ptr getelementptr inbounds ([8 x i64], ptr @r64, i32 0, i32 1), align 8
; VEC256-AVX2-NEXT: store i64 [[R2]], ptr getelementptr inbounds ([8 x i64], ptr @r64, i32 0, i32 2), align 8
; VEC256-AVX2-NEXT: store i64 [[R3]], ptr getelementptr inbounds ([8 x i64], ptr @r64, i32 0, i32 3), align 8
; VEC256-AVX2-NEXT: store i64 [[R4]], ptr getelementptr inbounds ([8 x i64], ptr @r64, i32 0, i32 4), align 8
; VEC256-AVX2-NEXT: store i64 [[R5]], ptr getelementptr inbounds ([8 x i64], ptr @r64, i32 0, i32 5), align 8
; VEC256-AVX2-NEXT: store i64 [[R6]], ptr getelementptr inbounds ([8 x i64], ptr @r64, i32 0, i32 6), align 8
; VEC256-AVX2-NEXT: store i64 [[R7]], ptr getelementptr inbounds ([8 x i64], ptr @r64, i32 0, i32 7), align 8
; VEC256-AVX2-NEXT: ret void
;
; VEC256-AVX512-LABEL: @llrint_v8f32_v8i64(
; VEC256-AVX512-NEXT: [[TMP1:%.*]] = load <4 x float>, ptr @f32, align 8
; VEC256-AVX512-NEXT: [[TMP2:%.*]] = call <4 x i64> @llvm.llrint.v4i64.v4f32(<4 x float> [[TMP1]])
; VEC256-AVX512-NEXT: store <4 x i64> [[TMP2]], ptr @r64, align 8
; VEC256-AVX512-NEXT: [[TMP3:%.*]] = load <4 x float>, ptr getelementptr inbounds ([8 x float], ptr @f32, i32 0, i32 4), align 8
; VEC256-AVX512-NEXT: [[TMP4:%.*]] = call <4 x i64> @llvm.llrint.v4i64.v4f32(<4 x float> [[TMP3]])
; VEC256-AVX512-NEXT: store <4 x i64> [[TMP4]], ptr getelementptr inbounds ([8 x i64], ptr @r64, i32 0, i32 4), align 8
; VEC256-AVX512-NEXT: ret void
;
; VEC512-LABEL: @llrint_v8f32_v8i64(
; VEC512-NEXT: [[TMP1:%.*]] = load <8 x float>, ptr @f32, align 8
; VEC512-NEXT: [[TMP2:%.*]] = call <8 x i64> @llvm.llrint.v8i64.v8f32(<8 x float> [[TMP1]])
; VEC512-NEXT: store <8 x i64> [[TMP2]], ptr @r64, align 8
; VEC512-NEXT: ret void
;
%a0 = load float, ptr @f32, align 8
%a1 = load float, ptr getelementptr inbounds ([8 x float], ptr @f32, i32 0, i32 1), align 8
%a2 = load float, ptr getelementptr inbounds ([8 x float], ptr @f32, i32 0, i32 2), align 8
%a3 = load float, ptr getelementptr inbounds ([8 x float], ptr @f32, i32 0, i32 3), align 8
%a4 = load float, ptr getelementptr inbounds ([8 x float], ptr @f32, i32 0, i32 4), align 8
%a5 = load float, ptr getelementptr inbounds ([8 x float], ptr @f32, i32 0, i32 5), align 8
%a6 = load float, ptr getelementptr inbounds ([8 x float], ptr @f32, i32 0, i32 6), align 8
%a7 = load float, ptr getelementptr inbounds ([8 x float], ptr @f32, i32 0, i32 7), align 8
%r0 = call i64 @llvm.llrint.i64.f32(float %a0)
%r1 = call i64 @llvm.llrint.i64.f32(float %a1)
%r2 = call i64 @llvm.llrint.i64.f32(float %a2)
%r3 = call i64 @llvm.llrint.i64.f32(float %a3)
%r4 = call i64 @llvm.llrint.i64.f32(float %a4)
%r5 = call i64 @llvm.llrint.i64.f32(float %a5)
%r6 = call i64 @llvm.llrint.i64.f32(float %a6)
%r7 = call i64 @llvm.llrint.i64.f32(float %a7)
store i64 %r0, ptr @r64, align 8
store i64 %r1, ptr getelementptr inbounds ([8 x i64], ptr @r64, i32 0, i32 1), align 8
store i64 %r2, ptr getelementptr inbounds ([8 x i64], ptr @r64, i32 0, i32 2), align 8
store i64 %r3, ptr getelementptr inbounds ([8 x i64], ptr @r64, i32 0, i32 3), align 8
store i64 %r4, ptr getelementptr inbounds ([8 x i64], ptr @r64, i32 0, i32 4), align 8
store i64 %r5, ptr getelementptr inbounds ([8 x i64], ptr @r64, i32 0, i32 5), align 8
store i64 %r6, ptr getelementptr inbounds ([8 x i64], ptr @r64, i32 0, i32 6), align 8
store i64 %r7, ptr getelementptr inbounds ([8 x i64], ptr @r64, i32 0, i32 7), align 8
ret void
}
define void @llrint_v8f64_v8i64() {
; SCALAR-LABEL: @llrint_v8f64_v8i64(
; SCALAR-NEXT: [[A0:%.*]] = load double, ptr @f64, align 8
; SCALAR-NEXT: [[A1:%.*]] = load double, ptr getelementptr inbounds ([8 x double], ptr @f64, i32 0, i32 1), align 8
; SCALAR-NEXT: [[A2:%.*]] = load double, ptr getelementptr inbounds ([8 x double], ptr @f64, i32 0, i32 2), align 8
; SCALAR-NEXT: [[A3:%.*]] = load double, ptr getelementptr inbounds ([8 x double], ptr @f64, i32 0, i32 3), align 8
; SCALAR-NEXT: [[A4:%.*]] = load double, ptr getelementptr inbounds ([8 x double], ptr @f64, i32 0, i32 4), align 8
; SCALAR-NEXT: [[A5:%.*]] = load double, ptr getelementptr inbounds ([8 x double], ptr @f64, i32 0, i32 5), align 8
; SCALAR-NEXT: [[A6:%.*]] = load double, ptr getelementptr inbounds ([8 x double], ptr @f64, i32 0, i32 6), align 8
; SCALAR-NEXT: [[A7:%.*]] = load double, ptr getelementptr inbounds ([8 x double], ptr @f64, i32 0, i32 7), align 8
; SCALAR-NEXT: [[R0:%.*]] = call i64 @llvm.llrint.i64.f64(double [[A0]])
; SCALAR-NEXT: [[R1:%.*]] = call i64 @llvm.llrint.i64.f64(double [[A1]])
; SCALAR-NEXT: [[R2:%.*]] = call i64 @llvm.llrint.i64.f64(double [[A2]])
; SCALAR-NEXT: [[R3:%.*]] = call i64 @llvm.llrint.i64.f64(double [[A3]])
; SCALAR-NEXT: [[R4:%.*]] = call i64 @llvm.llrint.i64.f64(double [[A4]])
; SCALAR-NEXT: [[R5:%.*]] = call i64 @llvm.llrint.i64.f64(double [[A5]])
; SCALAR-NEXT: [[R6:%.*]] = call i64 @llvm.llrint.i64.f64(double [[A6]])
; SCALAR-NEXT: [[R7:%.*]] = call i64 @llvm.llrint.i64.f64(double [[A7]])
; SCALAR-NEXT: store i64 [[R0]], ptr @r64, align 8
; SCALAR-NEXT: store i64 [[R1]], ptr getelementptr inbounds ([8 x i64], ptr @r64, i32 0, i32 1), align 8
; SCALAR-NEXT: store i64 [[R2]], ptr getelementptr inbounds ([8 x i64], ptr @r64, i32 0, i32 2), align 8
; SCALAR-NEXT: store i64 [[R3]], ptr getelementptr inbounds ([8 x i64], ptr @r64, i32 0, i32 3), align 8
; SCALAR-NEXT: store i64 [[R4]], ptr getelementptr inbounds ([8 x i64], ptr @r64, i32 0, i32 4), align 8
; SCALAR-NEXT: store i64 [[R5]], ptr getelementptr inbounds ([8 x i64], ptr @r64, i32 0, i32 5), align 8
; SCALAR-NEXT: store i64 [[R6]], ptr getelementptr inbounds ([8 x i64], ptr @r64, i32 0, i32 6), align 8
; SCALAR-NEXT: store i64 [[R7]], ptr getelementptr inbounds ([8 x i64], ptr @r64, i32 0, i32 7), align 8
; SCALAR-NEXT: ret void
;
; VEC128-LABEL: @llrint_v8f64_v8i64(
; VEC128-NEXT: [[A0:%.*]] = load double, ptr @f64, align 8
; VEC128-NEXT: [[A1:%.*]] = load double, ptr getelementptr inbounds ([8 x double], ptr @f64, i32 0, i32 1), align 8
; VEC128-NEXT: [[A2:%.*]] = load double, ptr getelementptr inbounds ([8 x double], ptr @f64, i32 0, i32 2), align 8
; VEC128-NEXT: [[A3:%.*]] = load double, ptr getelementptr inbounds ([8 x double], ptr @f64, i32 0, i32 3), align 8
; VEC128-NEXT: [[A4:%.*]] = load double, ptr getelementptr inbounds ([8 x double], ptr @f64, i32 0, i32 4), align 8
; VEC128-NEXT: [[A5:%.*]] = load double, ptr getelementptr inbounds ([8 x double], ptr @f64, i32 0, i32 5), align 8
; VEC128-NEXT: [[A6:%.*]] = load double, ptr getelementptr inbounds ([8 x double], ptr @f64, i32 0, i32 6), align 8
; VEC128-NEXT: [[A7:%.*]] = load double, ptr getelementptr inbounds ([8 x double], ptr @f64, i32 0, i32 7), align 8
; VEC128-NEXT: [[R0:%.*]] = call i64 @llvm.llrint.i64.f64(double [[A0]])
; VEC128-NEXT: [[R1:%.*]] = call i64 @llvm.llrint.i64.f64(double [[A1]])
; VEC128-NEXT: [[R2:%.*]] = call i64 @llvm.llrint.i64.f64(double [[A2]])
; VEC128-NEXT: [[R3:%.*]] = call i64 @llvm.llrint.i64.f64(double [[A3]])
; VEC128-NEXT: [[R4:%.*]] = call i64 @llvm.llrint.i64.f64(double [[A4]])
; VEC128-NEXT: [[R5:%.*]] = call i64 @llvm.llrint.i64.f64(double [[A5]])
; VEC128-NEXT: [[R6:%.*]] = call i64 @llvm.llrint.i64.f64(double [[A6]])
; VEC128-NEXT: [[R7:%.*]] = call i64 @llvm.llrint.i64.f64(double [[A7]])
; VEC128-NEXT: store i64 [[R0]], ptr @r64, align 8
; VEC128-NEXT: store i64 [[R1]], ptr getelementptr inbounds ([8 x i64], ptr @r64, i32 0, i32 1), align 8
; VEC128-NEXT: store i64 [[R2]], ptr getelementptr inbounds ([8 x i64], ptr @r64, i32 0, i32 2), align 8
; VEC128-NEXT: store i64 [[R3]], ptr getelementptr inbounds ([8 x i64], ptr @r64, i32 0, i32 3), align 8
; VEC128-NEXT: store i64 [[R4]], ptr getelementptr inbounds ([8 x i64], ptr @r64, i32 0, i32 4), align 8
; VEC128-NEXT: store i64 [[R5]], ptr getelementptr inbounds ([8 x i64], ptr @r64, i32 0, i32 5), align 8
; VEC128-NEXT: store i64 [[R6]], ptr getelementptr inbounds ([8 x i64], ptr @r64, i32 0, i32 6), align 8
; VEC128-NEXT: store i64 [[R7]], ptr getelementptr inbounds ([8 x i64], ptr @r64, i32 0, i32 7), align 8
; VEC128-NEXT: ret void
;
; VEC256-AVX2-LABEL: @llrint_v8f64_v8i64(
; VEC256-AVX2-NEXT: [[A0:%.*]] = load double, ptr @f64, align 8
; VEC256-AVX2-NEXT: [[A1:%.*]] = load double, ptr getelementptr inbounds ([8 x double], ptr @f64, i32 0, i32 1), align 8
; VEC256-AVX2-NEXT: [[A2:%.*]] = load double, ptr getelementptr inbounds ([8 x double], ptr @f64, i32 0, i32 2), align 8
; VEC256-AVX2-NEXT: [[A3:%.*]] = load double, ptr getelementptr inbounds ([8 x double], ptr @f64, i32 0, i32 3), align 8
; VEC256-AVX2-NEXT: [[A4:%.*]] = load double, ptr getelementptr inbounds ([8 x double], ptr @f64, i32 0, i32 4), align 8
; VEC256-AVX2-NEXT: [[A5:%.*]] = load double, ptr getelementptr inbounds ([8 x double], ptr @f64, i32 0, i32 5), align 8
; VEC256-AVX2-NEXT: [[A6:%.*]] = load double, ptr getelementptr inbounds ([8 x double], ptr @f64, i32 0, i32 6), align 8
; VEC256-AVX2-NEXT: [[A7:%.*]] = load double, ptr getelementptr inbounds ([8 x double], ptr @f64, i32 0, i32 7), align 8
; VEC256-AVX2-NEXT: [[R0:%.*]] = call i64 @llvm.llrint.i64.f64(double [[A0]])
; VEC256-AVX2-NEXT: [[R1:%.*]] = call i64 @llvm.llrint.i64.f64(double [[A1]])
; VEC256-AVX2-NEXT: [[R2:%.*]] = call i64 @llvm.llrint.i64.f64(double [[A2]])
; VEC256-AVX2-NEXT: [[R3:%.*]] = call i64 @llvm.llrint.i64.f64(double [[A3]])
; VEC256-AVX2-NEXT: [[R4:%.*]] = call i64 @llvm.llrint.i64.f64(double [[A4]])
; VEC256-AVX2-NEXT: [[R5:%.*]] = call i64 @llvm.llrint.i64.f64(double [[A5]])
; VEC256-AVX2-NEXT: [[R6:%.*]] = call i64 @llvm.llrint.i64.f64(double [[A6]])
; VEC256-AVX2-NEXT: [[R7:%.*]] = call i64 @llvm.llrint.i64.f64(double [[A7]])
; VEC256-AVX2-NEXT: store i64 [[R0]], ptr @r64, align 8
; VEC256-AVX2-NEXT: store i64 [[R1]], ptr getelementptr inbounds ([8 x i64], ptr @r64, i32 0, i32 1), align 8
; VEC256-AVX2-NEXT: store i64 [[R2]], ptr getelementptr inbounds ([8 x i64], ptr @r64, i32 0, i32 2), align 8
; VEC256-AVX2-NEXT: store i64 [[R3]], ptr getelementptr inbounds ([8 x i64], ptr @r64, i32 0, i32 3), align 8
; VEC256-AVX2-NEXT: store i64 [[R4]], ptr getelementptr inbounds ([8 x i64], ptr @r64, i32 0, i32 4), align 8
; VEC256-AVX2-NEXT: store i64 [[R5]], ptr getelementptr inbounds ([8 x i64], ptr @r64, i32 0, i32 5), align 8
; VEC256-AVX2-NEXT: store i64 [[R6]], ptr getelementptr inbounds ([8 x i64], ptr @r64, i32 0, i32 6), align 8
; VEC256-AVX2-NEXT: store i64 [[R7]], ptr getelementptr inbounds ([8 x i64], ptr @r64, i32 0, i32 7), align 8
; VEC256-AVX2-NEXT: ret void
;
; VEC256-AVX512-LABEL: @llrint_v8f64_v8i64(
; VEC256-AVX512-NEXT: [[TMP1:%.*]] = load <4 x double>, ptr @f64, align 8
; VEC256-AVX512-NEXT: [[TMP2:%.*]] = call <4 x i64> @llvm.llrint.v4i64.v4f64(<4 x double> [[TMP1]])
; VEC256-AVX512-NEXT: store <4 x i64> [[TMP2]], ptr @r64, align 8
; VEC256-AVX512-NEXT: [[TMP3:%.*]] = load <4 x double>, ptr getelementptr inbounds ([8 x double], ptr @f64, i32 0, i32 4), align 8
; VEC256-AVX512-NEXT: [[TMP4:%.*]] = call <4 x i64> @llvm.llrint.v4i64.v4f64(<4 x double> [[TMP3]])
; VEC256-AVX512-NEXT: store <4 x i64> [[TMP4]], ptr getelementptr inbounds ([8 x i64], ptr @r64, i32 0, i32 4), align 8
; VEC256-AVX512-NEXT: ret void
;
; VEC512-LABEL: @llrint_v8f64_v8i64(
; VEC512-NEXT: [[TMP1:%.*]] = load <8 x double>, ptr @f64, align 8
; VEC512-NEXT: [[TMP2:%.*]] = call <8 x i64> @llvm.llrint.v8i64.v8f64(<8 x double> [[TMP1]])
; VEC512-NEXT: store <8 x i64> [[TMP2]], ptr @r64, align 8
; VEC512-NEXT: ret void
;
%a0 = load double, ptr @f64, align 8
%a1 = load double, ptr getelementptr inbounds ([8 x double], ptr @f64, i32 0, i32 1), align 8
%a2 = load double, ptr getelementptr inbounds ([8 x double], ptr @f64, i32 0, i32 2), align 8
%a3 = load double, ptr getelementptr inbounds ([8 x double], ptr @f64, i32 0, i32 3), align 8
%a4 = load double, ptr getelementptr inbounds ([8 x double], ptr @f64, i32 0, i32 4), align 8
%a5 = load double, ptr getelementptr inbounds ([8 x double], ptr @f64, i32 0, i32 5), align 8
%a6 = load double, ptr getelementptr inbounds ([8 x double], ptr @f64, i32 0, i32 6), align 8
%a7 = load double, ptr getelementptr inbounds ([8 x double], ptr @f64, i32 0, i32 7), align 8
%r0 = call i64 @llvm.llrint.i64.f64(double %a0)
%r1 = call i64 @llvm.llrint.i64.f64(double %a1)
%r2 = call i64 @llvm.llrint.i64.f64(double %a2)
%r3 = call i64 @llvm.llrint.i64.f64(double %a3)
%r4 = call i64 @llvm.llrint.i64.f64(double %a4)
%r5 = call i64 @llvm.llrint.i64.f64(double %a5)
%r6 = call i64 @llvm.llrint.i64.f64(double %a6)
%r7 = call i64 @llvm.llrint.i64.f64(double %a7)
store i64 %r0, ptr @r64, align 8
store i64 %r1, ptr getelementptr inbounds ([8 x i64], ptr @r64, i32 0, i32 1), align 8
store i64 %r2, ptr getelementptr inbounds ([8 x i64], ptr @r64, i32 0, i32 2), align 8
store i64 %r3, ptr getelementptr inbounds ([8 x i64], ptr @r64, i32 0, i32 3), align 8
store i64 %r4, ptr getelementptr inbounds ([8 x i64], ptr @r64, i32 0, i32 4), align 8
store i64 %r5, ptr getelementptr inbounds ([8 x i64], ptr @r64, i32 0, i32 5), align 8
store i64 %r6, ptr getelementptr inbounds ([8 x i64], ptr @r64, i32 0, i32 6), align 8
store i64 %r7, ptr getelementptr inbounds ([8 x i64], ptr @r64, i32 0, i32 7), align 8
ret void
}
;; NOTE: These prefixes are unused and the list is autogenerated. Do not add tests below this line:
; CHECK: {{.*}}