Skip to content

Make System.Math/MathF.Truncate an intrinsic - #65014

Merged
tannergooding merged 1 commit into
dotnet:mainfrom
MichalPetryka:intrinsic-truncate
Feb 11, 2022
Merged

Make System.Math/MathF.Truncate an intrinsic#65014
tannergooding merged 1 commit into
dotnet:mainfrom
MichalPetryka:intrinsic-truncate

Conversation

@MichalPetryka

Copy link
Copy Markdown
Contributor

Makes Truncate emit round with truncate mode on xarch and frintz on aarch64.

Based off current handling for Ceiling.

Fixes#56931

@ghostghost added area-System.Numerics community-contribution Indicates that the PR has been added by a community member labels Feb 8, 2022
@ghost

ghost commented Feb 8, 2022

Copy link
Copy Markdown

Tagging subscribers to this area: @dotnet/area-system-numerics
See info in area-owners.md if you want to be subscribed.

Issue Details

Makes Truncate emit round with truncate mode on xarch and frintz on aarch64.

Based off current handling for Ceiling.

Fixes #56931

Author:MichalPetryka
Assignees:-
Labels:

area-System.Numerics

Milestone:-

@MichalPetryka

Copy link
Copy Markdown
ContributorAuthor

@tannergooding asked me to revert the fcalls and add back the managed method instead on discord, will handle it tomorrow.

@MichalPetryka
MichalPetryka marked this pull request as ready for review February 9, 2022 18:00
@MichalPetryka

Copy link
Copy Markdown
ContributorAuthor

Test failures seem unrelated, marking as ready for review.

@tannergooding

Copy link
Copy Markdown
Member

CC. @dotnet/jit-contrib; Community PR needs secondary sign-off

@echesakovechesakov left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM

@tannergooding
tannergooding merged commit a44b7c2 into dotnet:mainFeb 11, 2022
@JulieLeeMSFTJulieLeeMSFT added this to the 7.0.0 milestone Feb 16, 2022
@ghostghost locked as resolved and limited conversation to collaborators Mar 18, 2022
Sign up for freeto subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

area-System.Numericscommunity-contributionIndicates that the PR has been added by a community member

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Math/MathF.Truncate isn't an intrinsic and results in inefficient codegen

4 participants

@MichalPetryka@tannergooding@echesakov@JulieLeeMSFT