JIT: register __fixunssfti / __fixunsdfti for toUInt128(Float)#105048
Merged
alexey-milovidov merged 1 commit intoMay 15, 2026
Conversation
The JIT symbol resolver was registering only the signed 128-bit float-to-int compiler-rt builtins (__fixsfti, __fixdfti). When LLVM lowered `fptoui` to a 128-bit integer (e.g. toUInt128 of a Float expression), it emitted calls to __fixunssfti / __fixunsdfti, which were never registered, so the JIT linker failed with `CANNOT_COMPILE_CODE Could not find symbol __fixunsdfti` as soon as the expression got hot enough to be compiled. Add the missing unsigned variants, plus __udivti3 / __umodti3 so every libcall in the resolver now has both signed and unsigned entries, and document the signed/unsigned-pair rule in a comment so the asymmetry that caused this bug is not reintroduced. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Contributor
|
Workflow [PR], commit [de4c439] Summary: ✅ AI ReviewSummaryThis PR fixes JIT symbol resolution for float-to-unsigned-128 conversions by registering missing compiler-rt builtins ( Final VerdictStatus: ✅ Approve |
Contributor
LLVM Coverage Report
Changed lines: 100.00% (12/12) · Uncovered code |
alexey-milovidov
approved these changes
May 15, 2026
robot-clickhouse-ci-1
added a commit
that referenced
this pull request
May 16, 2026
Cherry pick #105048 to 26.2: JIT: register __fixunssfti / __fixunsdfti for toUInt128(Float)
robot-clickhouse-ci-1
added a commit
that referenced
this pull request
May 16, 2026
Cherry pick #105048 to 26.3: JIT: register __fixunssfti / __fixunsdfti for toUInt128(Float)
robot-clickhouse-ci-1
added a commit
that referenced
this pull request
May 16, 2026
Cherry pick #105048 to 26.4: JIT: register __fixunssfti / __fixunsdfti for toUInt128(Float)
alexey-milovidov
added a commit
that referenced
this pull request
May 16, 2026
Backport #105048 to 26.4: JIT: register __fixunssfti / __fixunsdfti for toUInt128(Float)
alexey-milovidov
added a commit
that referenced
this pull request
May 16, 2026
Backport #105048 to 26.3: JIT: register __fixunssfti / __fixunsdfti for toUInt128(Float)
fm4v
added a commit
that referenced
this pull request
May 16, 2026
Backport #105048 to 26.2: JIT: register __fixunssfti / __fixunsdfti for toUInt128(Float)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Changelog category (leave one):
Changelog entry (a user-readable short description of the changes that goes into CHANGELOG.md):
Fix
CANNOT_COMPILE_CODE Could not find symbol __fixunsdftiwhen JIT-compiling expressions that convert aFloattoUInt128, such astoUInt128(<Float64 expression>). The unsigned 128-bit float-to-int compiler-rt builtins were missing from the JIT symbol resolver. Closes #105031.