-
Notifications
You must be signed in to change notification settings - Fork 5.2k
Open
Labels
area-CodeGen-coreclrCLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMICLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMItenet-performancePerformance related issuePerformance related issue
Milestone
Description
As per #47843 (comment), Ckfinite is currently doing manual bit manipulation to check if a floating-point value is finite.
Given that SSE2 and AdvSimd 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:
andnot value, -0.0 ; Get absolute value
cmp value, +inf ; Compare with +infinity
setne result ; Set if not equal to true
On x86, these would be andnps and ucomiss respectively and functions given that nan 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
Metadata
Metadata
Assignees
Labels
area-CodeGen-coreclrCLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMICLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMItenet-performancePerformance related issuePerformance related issue