Skip to content

Make sure we actually use overflow builtins#6904

Merged
davebayer merged 3 commits intoNVIDIA:mainfrom
davebayer:fix_check_builtin
Dec 10, 2025
Merged

Make sure we actually use overflow builtins#6904
davebayer merged 3 commits intoNVIDIA:mainfrom
davebayer:fix_check_builtin

Conversation

@davebayer
Copy link
Contributor

@davebayer davebayer commented Dec 8, 2025

We should be careful about removing the __ prefix when detecting builtins by _CCCL_CHECK_BUILTIN(...)..

I've also found some bugs in 13.1 __builtin_add_overflow and __builtin_sub_overflow implementation (nvbug 5724197).

@davebayer davebayer requested a review from a team as a code owner December 8, 2025 12:11
@davebayer davebayer requested a review from pciolkosz December 8, 2025 12:11
@github-project-automation github-project-automation bot moved this to Todo in CCCL Dec 8, 2025
@cccl-authenticator-app cccl-authenticator-app bot moved this from Todo to In Review in CCCL Dec 8, 2025
Comment on lines +47 to +49
#if _CCCL_CHECK_BUILTIN(builtin_add_overflow) || _CCCL_COMPILER(GCC)
# define _CCCL_BUILTIN_ADD_OVERFLOW(...) __builtin_add_overflow(__VA_ARGS__)
#endif // _CCCL_CHECK_BUILTIN(__builtin_add_overflow)
#endif // _CCCL_CHECK_BUILTIN(builtin_add_overflow)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🙀

@github-actions

This comment has been minimized.

@github-actions

This comment has been minimized.

@davebayer davebayer self-assigned this Dec 10, 2025
@davebayer davebayer enabled auto-merge (squash) December 10, 2025 11:10
@github-actions
Copy link
Contributor

🥳 CI Workflow Results

🟩 Finished in 5h 00m: Pass: 100%/91 | Total: 1d 18h | Max: 3h 14m | Hits: 99%/195470

See results here.

@davebayer davebayer merged commit 6d2f46e into NVIDIA:main Dec 10, 2025
103 checks passed
@github-project-automation github-project-automation bot moved this from In Review to Done in CCCL Dec 10, 2025
github-actions bot pushed a commit that referenced this pull request Dec 10, 2025
@github-actions
Copy link
Contributor

Successfully created backport PR for branch/3.2.x:

davebayer added a commit that referenced this pull request Dec 13, 2025
(cherry picked from commit 6d2f46e)

Co-authored-by: David Bayer <[email protected]>
@davebayer davebayer deleted the fix_check_builtin branch December 19, 2025 16:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

2 participants