Skip to content

Cherry pick #105048 to 26.4: JIT: register __fixunssfti / __fixunsdfti for toUInt128(Float)#105097

Merged
robot-clickhouse-ci-1 merged 3 commits into
backport/26.4/105048from
cherrypick/26.4/105048
May 16, 2026
Merged

Cherry pick #105048 to 26.4: JIT: register __fixunssfti / __fixunsdfti for toUInt128(Float)#105097
robot-clickhouse-ci-1 merged 3 commits into
backport/26.4/105048from
cherrypick/26.4/105048

Conversation

@robot-clickhouse-ci-1
Copy link
Copy Markdown
Contributor

Original pull-request #105048

Do not merge this PR manually

This pull-request is a first step of an automated backporting.
It contains changes similar to calling git cherry-pick locally.
If you intend to continue backporting the changes, then resolve all conflicts if any.
Otherwise, if you do not want to backport them, then just close this pull-request.

The check results does not matter at this step - you can safely ignore them.

Troubleshooting

If the conflicts were resolved in a wrong way

If this cherry-pick PR is completely screwed by a wrong conflicts resolution, and you want to recreate it:

  • delete the pr-cherrypick label from the PR
  • delete this branch from the repository

You also need to check the Original pull-request for pr-backports-created label, and delete if it's presented there

The PR source

The PR is created in the CI job

Algunenano and others added 3 commits May 15, 2026 17:29
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>
JIT: register __fixunssfti / __fixunsdfti for toUInt128(Float)
@robot-clickhouse-ci-1 robot-clickhouse-ci-1 added pr-cherrypick Cherry-pick of merge-commit before backporting. Do not use manually - automated use only! do not test disable testing on pull request pr-bugfix Pull request with bugfix, not backported by default labels May 16, 2026
@robot-clickhouse-ci-1 robot-clickhouse-ci-1 merged commit cdeb99a into backport/26.4/105048 May 16, 2026
@robot-clickhouse-ci-1 robot-clickhouse-ci-1 deleted the cherrypick/26.4/105048 branch May 16, 2026 01:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

do not test disable testing on pull request pr-bugfix Pull request with bugfix, not backported by default pr-cherrypick Cherry-pick of merge-commit before backporting. Do not use manually - automated use only!

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants