[llvm] [X86] lowerFPToIntToFP - handle UI2FP on AVX512VL targets and i64 types on AVX512DQ targets (PR #162656)
Kavin Gnanapandithan via llvm-commits
llvm-commits at lists.llvm.org
Thu Jan 8 18:58:26 PST 2026
================
@@ -50,42 +57,407 @@ define i32 @isint_float_return(float %f) nounwind {
; X86-NEXT: movd %xmm1, %eax
; X86-NEXT: andl $1, %eax
; X86-NEXT: retl
+;
+; AVX512VL-LABEL: isint_float_return:
+; AVX512VL: # %bb.0:
+; AVX512VL-NEXT: vroundss $11, %xmm0, %xmm0, %xmm1
+; AVX512VL-NEXT: vcmpeqss %xmm1, %xmm0, %k0
+; AVX512VL-NEXT: kmovw %k0, %eax
+; AVX512VL-NEXT: retq
%i = fptosi float %f to i32
%g = sitofp i32 %i to float
%c = fcmp oeq float %f, %g
%z = zext i1 %c to i32
ret i32 %z
}
+define i64 @isint64_float_return(float %f) nounwind {
----------------
KavinTheG wrote:
Are the additional tests in `isint.ll` necessary? I only added them as I thought at the time that `isint.ll` was the appropriate test file (and only test file) for `lowerFPToIntToFP`.
https://github.com/llvm/llvm-project/pull/162656
More information about the llvm-commits
mailing list