Skip to content

Fix native convert builtins for saturated and rounded conversions - #1702

Merged
rjodinchr merged 1 commit into
google:mainfrom
rjodinchr:sat-rnd-conv
Oct 23, 2026
Merged

rjodinchr merged 1 commit into
google:mainfrom
rjodinchr:sat-rnd-conv

Conversation

@rjodinchr

Copy link
Copy Markdown
Collaborator

Keep libclc function bodies for saturated (convert__sat) and explicit rounding-mode (convert__rt) conversions in NativeMathPass when using --cl-native-math or --use-native-builtins, since ReplaceOpenCLBuiltinPass::replaceConvert only lowers default unsaturated conversions.

Also account for the '_clc' prefix in Builtins::FunctionInfo when deducing return type signedness for internal _clc_convert* helpers.

Keep libclc function bodies for saturated (convert_*_sat*) and
explicit rounding-mode (convert_*_rt*) conversions in NativeMathPass
when using --cl-native-math or --use-native-builtins, since
ReplaceOpenCLBuiltinPass::replaceConvert only lowers default
unsaturated conversions.

Also account for the '__clc_' prefix in Builtins::FunctionInfo when
deducing return type signedness for internal __clc_convert_* helpers.
@rjodinchr
rjodinchr merged commit b7ec3dd into google:main Oct 23, 2026
18 checks passed
@rjodinchr
rjodinchr deleted the sat-rnd-conv branch October 23, 2026 16:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants