Skip to content

Conversation

@tannergooding
Copy link
Member

This resolves #119066 and resolves #118848

This will need backport to .NET 10

Copilot AI review requested due to automatic review settings August 25, 2025 15:39
@github-actions github-actions bot added the area-CodeGen-coreclr CLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMI label Aug 25, 2025
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR fixes Vector function lookups to use the correct names and types in the JIT compiler. The changes address issues where comparison operations and the SquareRoot method were not being properly recognized by the intrinsic lookup system, which could lead to missed optimizations.

Key changes:

  • Added mapping from "SquareRoot" to "Sqrt" for method name lookup
  • Added HW_Flag_BaseTypeFromFirstArg flag to comparison intrinsics (Equals, GreaterThan, etc.) to ensure proper type resolution
  • Added regression test to verify Vector.LessThan functionality

Reviewed Changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated no comments.

Show a summary per file
File Description
src/coreclr/jit/importercalls.cpp Added method name mapping for SquareRoot to Sqrt
src/coreclr/jit/hwintrinsiclistxarch.h Added BaseTypeFromFirstArg flag to comparison intrinsics for x86/x64
src/coreclr/jit/hwintrinsiclistarm64.h Added BaseTypeFromFirstArg flag to comparison intrinsics for ARM64
src/tests/JIT/Regression/JitBlue/Runtime_119008/Runtime_119008.csproj Test project configuration for regression test
src/tests/JIT/Regression/JitBlue/Runtime_119008/Runtime_119008.cs Regression test verifying Vector.LessThan behavior

@dotnet-policy-service
Copy link
Contributor

Tagging subscribers to this area: @JulieLeeMSFT, @jakobbotsch
See info in area-owners.md if you want to be subscribed.

@tannergooding
Copy link
Member Author

/backport to release/10.0-rc1

@github-actions
Copy link
Contributor

Started backporting to release/10.0-rc1: https://github.com/dotnet/runtime/actions/runs/17213927490

@tannergooding tannergooding merged commit 8a3c2e4 into dotnet:main Aug 25, 2025
118 checks passed
@tannergooding tannergooding deleted the fix-119066 branch August 25, 2025 20:16
@jeffhandley
Copy link
Member

/backport to release/10.0

@github-actions
Copy link
Contributor

Started backporting to release/10.0: https://github.com/dotnet/runtime/actions/runs/17222455059

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

area-CodeGen-coreclr CLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMI

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Vector.LessThan fails for negative floating point numbers (NET10 Preview 7) Vector<T>.SquareRoot no longer vectorizing in .NET 10.0

3 participants