Skip to content

GDA: Lower several op_with_overflow intrinsics#321

Merged
alexp-sssup merged 2 commits intomasterfrom
cheerpos-fixes6
Aug 26, 2025
Merged

GDA: Lower several op_with_overflow intrinsics#321
alexp-sssup merged 2 commits intomasterfrom
cheerpos-fixes6

Conversation

@alexp-sssup
Copy link
Member

No description provided.

@alexp-sssup alexp-sssup requested review from Copilot and yuri91 August 25, 2025 15:24
Copy link

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 extends the GlobalDepsAnalyzer to lower additional overflow intrinsics by implementing manual overflow detection for signed arithmetic operations. The change allows these intrinsics to be replaced with explicit arithmetic and comparison operations when compiling with the LLC pass.

  • Added lowering support for sadd_with_overflow and ssub_with_overflow intrinsics using bit manipulation techniques
  • Added lowering support for smul_with_overflow intrinsic using division-based overflow detection
  • Fixed missing continue statements in existing overflow intrinsic handlers

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.


// Declare success.
Out->keep();
// Try to make the output executable, some build systems depend on it
Copy link
Member

Choose a reason for hiding this comment

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

only for cheerpos?

To emulate the behavior of native linkers
@alexp-sssup alexp-sssup merged commit f8c49d0 into master Aug 26, 2025
1 check passed
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.

3 participants