Skip to content

Conversation

@saucecontrol
Copy link
Member

@saucecontrol saucecontrol commented Feb 6, 2025

Fixes #112163

This resolves the illegal instruction encoding by no longer pretending that movss and movsd are 'conversion' instructions, which have different encoding forms.

There's a minor codegen improvement (diffs) when a no-op cast has different source and target registers, where we now emit movaps instead of movss/movsd. Previously we would elide the cast only if source and target reg were the same.

-       vmovss   xmm1, xmm1, xmm2
+       vmovaps  xmm1, xmm2
        vbroadcastss xmm1, xmm1

@ghost ghost added the area-CodeGen-coreclr CLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMI label Feb 6, 2025
@dotnet-policy-service dotnet-policy-service bot added the community-contribution Indicates that the PR has been added by a community member label Feb 6, 2025
@saucecontrol saucecontrol mentioned this pull request Feb 6, 2025
@saucecontrol saucecontrol changed the title Fix illegal instruction encoding for floating->floating casts Fix illegal instruction encoding for float->float casts Feb 6, 2025
@saucecontrol saucecontrol changed the title Fix illegal instruction encoding for float->float casts JIT: Fix illegal instruction encoding for float->float casts Feb 6, 2025
@saucecontrol saucecontrol marked this pull request as ready for review February 6, 2025 06:56
@EgorBo
Copy link
Member

EgorBo commented Feb 6, 2025

/azp run runtime-coreclr jitstress-isas-avx512

@azure-pipelines
Copy link

Azure Pipelines could not run because the pipeline triggers exclude this branch/path.

@EgorBo
Copy link
Member

EgorBo commented Feb 6, 2025

/azp list

@azure-pipelines

This comment was marked as resolved.

@BruceForstall BruceForstall merged commit eb99e93 into dotnet:main Feb 14, 2025
119 checks passed
@saucecontrol saucecontrol deleted the float-cast branch February 14, 2025 01:09
@github-actions github-actions bot locked and limited conversation to collaborators Mar 17, 2025
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 community-contribution Indicates that the PR has been added by a community member

Projects

None yet

Development

Successfully merging this pull request may close these issues.

JIT: Illegal instruction at JitTest_chain_boxunbox_il.Test.Main() under DOTNET_JitStressRegs=0x2000

5 participants