Optimize ckfinite
for modern baselines.
#48022
Labels
area-CodeGen-coreclr
CLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMI
tenet-performance
Performance related issue
Milestone
As per #47843 (comment),
Ckfinite
is currently doing manual bit manipulation to check if a floating-point value is finite.Given that
SSE2
andAdvSimd
are the required baselines for RyuJIT, we should look at optimizing the output of this instruction to just use the optimal codegen.Notably, this can be done as effectively:
On x86, these would be
andnps
anducomiss
respectively and functions given thatnan
never compares equal to any other value, so we only need to check if the absolute value is or is not infinity.category:cq
theme:codegen
skill-level:intermediate
cost:medium
impact:small
The text was updated successfully, but these errors were encountered: