1 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
2 ; RUN: llc < %s -fast-isel -mtriple=x86_64-unknown-unknown -mattr=+sse | FileCheck %s --check-prefix=SSE
3 ; RUN: llc < %s -fast-isel -mtriple=x86_64-unknown-unknown -mattr=+avx | FileCheck %s --check-prefix=AVX
4 ; RUN: llc < %s -fast-isel -mtriple=x86_64-unknown-unknown -mattr=+avx512f,+avx512bw,+avx512dq,+avx512vl | FileCheck %s --check-prefix=AVX
6 ; NOTE: This should use IR equivalent to what is generated by clang/test/CodeGen/sse-builtins.c
8 define <4 x float> @test_mm_cvtsi64_ss(<4 x float> %a0, i64 %a1) nounwind {
9 ; SSE-LABEL: test_mm_cvtsi64_ss:
11 ; SSE-NEXT: cvtsi2ss %rdi, %xmm0
14 ; AVX-LABEL: test_mm_cvtsi64_ss:
16 ; AVX-NEXT: vcvtsi2ss %rdi, %xmm0, %xmm0
18 %res = call <4 x float> @llvm.x86.sse.cvtsi642ss(<4 x float> %a0, i64 %a1)
21 declare <4 x float> @llvm.x86.sse.cvtsi642ss(<4 x float>, i64) nounwind readnone
23 define i64 @test_mm_cvtss_si64(<4 x float> %a0) nounwind {
24 ; SSE-LABEL: test_mm_cvtss_si64:
26 ; SSE-NEXT: cvtss2si %xmm0, %rax
29 ; AVX-LABEL: test_mm_cvtss_si64:
31 ; AVX-NEXT: vcvtss2si %xmm0, %rax
33 %res = call i64 @llvm.x86.sse.cvtss2si64(<4 x float> %a0)
36 declare i64 @llvm.x86.sse.cvtss2si64(<4 x float>) nounwind readnone
38 define i64 @test_mm_cvttss_si64(<4 x float> %a0) nounwind {
39 ; SSE-LABEL: test_mm_cvttss_si64:
41 ; SSE-NEXT: cvttss2si %xmm0, %rax
44 ; AVX-LABEL: test_mm_cvttss_si64:
46 ; AVX-NEXT: vcvttss2si %xmm0, %rax
48 %res = call i64 @llvm.x86.sse.cvttss2si64(<4 x float> %a0)
51 declare i64 @llvm.x86.sse.cvttss2si64(<4 x float>) nounwind readnone