Skip to content

Conversation

andjo403
Copy link
Contributor

@andjo403 andjo403 commented Sep 2, 2025

Copy link
Member

@dtcxzyw dtcxzyw left a comment

Choose a reason for hiding this comment

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

LGTM. As for the regression, can we fix it in CVP/SCCP?

@dtcxzyw
Copy link
Member

dtcxzyw commented Sep 8, 2025

LGTM. As for the regression, can we fix it in CVP/SCCP?

main...dtcxzyw:llvm-project:perf/sccp-relax-icmp

@andjo403 andjo403 merged commit e11f93e into llvm:main Sep 8, 2025
10 checks passed
@andjo403
Copy link
Contributor Author

andjo403 commented Sep 8, 2025

sound nice find that the regression can be handled in sccp.

@andjo403 andjo403 deleted the chainNot branch September 8, 2025 17:42
dtcxzyw added a commit that referenced this pull request Sep 17, 2025
If we know x in R1, the range check `x in R2` can be relaxed into `x in
Union(R2, Inverse(R1))`. The latter one may be more efficient if we can
represent it with one icmp.
Fixes regressions introduced by
#156497.

Proof for `(X & -Pow2) == C -> (X - C) < Pow2`:
https://alive2.llvm.org/ce/z/HMgkuu

Compile-time impact:
https://llvm-compile-time-tracker.com/compare.php?from=ead4f3e271fdf6918aef2ede3a7134811147d276&to=bee3d902dd505cf9b11499ba4f230e4e8ae96b92&stat=instructions%3Au
llvm-sync bot pushed a commit to arm/arm-toolchain that referenced this pull request Sep 17, 2025
If we know x in R1, the range check `x in R2` can be relaxed into `x in
Union(R2, Inverse(R1))`. The latter one may be more efficient if we can
represent it with one icmp.
Fixes regressions introduced by
llvm/llvm-project#156497.

Proof for `(X & -Pow2) == C -> (X - C) < Pow2`:
https://alive2.llvm.org/ce/z/HMgkuu

Compile-time impact:
https://llvm-compile-time-tracker.com/compare.php?from=ead4f3e271fdf6918aef2ede3a7134811147d276&to=bee3d902dd505cf9b11499ba4f230e4e8ae96b92&stat=instructions%3Au
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