Skip to content

Conversation

@jakobbotsch
Copy link
Member

On 32-bit platforms we can end up with long operands to a function taking a parameter in a double register. We would try to create bitcasts for this case, which is not supported for 32 bit.

Generalize a condition to properly detect this unsupported case.

Fix #119062

On 32-bit platforms we can end up with long operands to a function
taking a parameter in a double. We would try to create bitcasts for this
cast.

Generalize a condition to properly detect this unsupported case.
@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 Sep 3, 2025
@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.

@jakobbotsch jakobbotsch marked this pull request as ready for review September 4, 2025 08:47
Copilot AI review requested due to automatic review settings September 4, 2025 08:47
@jakobbotsch
Copy link
Member Author

cc @dotnet/jit-contrib PTAL @AndyAyersMS

No diffs

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 a JIT compilation issue on 32-bit platforms where long operands passed to functions expecting parameters in double registers would incorrectly attempt unsupported bitcast operations. The fix generalizes the detection of unsupported argument conversion cases.

Key changes:

  • Removes an incorrect assertion about register/stack slot counts for long arguments
  • Generalizes the condition for detecting unsupported int-to-float register conversions beyond just SIMD types

@jakobbotsch jakobbotsch merged commit 729f6e6 into dotnet:main Sep 5, 2025
113 checks passed
@jakobbotsch
Copy link
Member Author

/backport to release/10.0

@github-actions
Copy link
Contributor

github-actions bot commented Sep 5, 2025

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

@github-actions
Copy link
Contributor

github-actions bot commented Sep 5, 2025

@jakobbotsch backporting to "release/10.0" failed, the patch most likely resulted in conflicts:

$ git am --3way --empty=keep --ignore-whitespace --keep-non-patch changes.patch

Applying: JIT: Handle more unsupported argument conversion cases
Using index info to reconstruct a base tree...
M	src/coreclr/jit/lower.cpp
Falling back to patching base and 3-way merge...
Auto-merging src/coreclr/jit/lower.cpp
CONFLICT (content): Merge conflict in src/coreclr/jit/lower.cpp
error: Failed to merge in the changes.
hint: Use 'git am --show-current-patch=diff' to see the failed patch
hint: When you have resolved this problem, run "git am --continue".
hint: If you prefer to skip this patch, run "git am --skip" instead.
hint: To restore the original branch and stop patching, run "git am --abort".
hint: Disable this message with "git config set advice.mergeConflict false"
Patch failed at 0001 JIT: Handle more unsupported argument conversion cases
Error: The process '/usr/bin/git' failed with exit code 128

Please backport manually!

@github-actions github-actions bot locked and limited conversation to collaborators Oct 6, 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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

JIT: jitstress-random test failure with Assertion failed 'callArg->AbiInfo.CountRegsAndStackSlots() == 2' during 'Lowering nodeinfo'

2 participants