Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: constant folding for Nat.ble and Nat.blt #6087

Merged
merged 2 commits into from
Nov 15, 2024
Merged

fix: constant folding for Nat.ble and Nat.blt #6087

merged 2 commits into from
Nov 15, 2024

Conversation

TwoFX
Copy link
Member

@TwoFX TwoFX commented Nov 15, 2024

This PR fixes a bug in the constant folding for the Nat.ble and Nat.blt function in the old code generator, leading to a miscompilation.

Closes #6086

@TwoFX TwoFX requested a review from leodemoura as a code owner November 15, 2024 10:02
@TwoFX
Copy link
Member Author

TwoFX commented Nov 15, 2024

!bench

@TwoFX TwoFX added the changelog-compiler Compiler, runtime, and FFI label Nov 15, 2024
@github-actions github-actions bot temporarily deployed to lean-lang.org/lean4/doc November 15, 2024 10:14 Inactive
@leanprover-bot
Copy link
Collaborator

Here are the benchmark results for commit a2d37c6.
There were significant changes against commit a074bd9:

  Benchmark           Metric                    Change
  ================================================================
+ big_omega.lean MT   branch-misses              -1.7%   (-18.8 σ)
+ nat_repr            branches                   -1.3% (-1777.3 σ)
+ nat_repr            instructions               -1.9% (-2472.1 σ)
- rbmap               instructions                5.9%   (404.2 σ)
- rbmap_1             instructions                1.6%    (16.6 σ)
- rbmap_1             task-clock                  5.7%    (13.6 σ)
- rbmap_1             wall-clock                  5.7%    (13.6 σ)
- rbmap_10            instructions                4.5%    (93.7 σ)
- rbmap_fbip          task-clock                 12.5%    (11.8 σ)
- rbmap_fbip          wall-clock                 12.5%    (12.0 σ)
- rbmap_library       instructions                4.7%   (296.0 σ)
- stdlib              dsimp                       1.2%    (67.4 σ)
- stdlib              fix level params            1.1%    (32.2 σ)
- stdlib              process pre-definitions     1.1%    (18.8 σ)

@github-actions github-actions bot added the toolchain-available A toolchain is available for this PR, at leanprover/lean4-pr-releases:pr-release-NNNN label Nov 15, 2024
@leanprover-community-bot
Copy link
Collaborator

Mathlib CI status (docs):

  • ❗ Mathlib CI can not be attempted yet, as the nightly-testing-2024-11-15 tag does not exist there yet. We will retry when you push more commits. If you rebase your branch onto nightly-with-mathlib, Mathlib CI should run now. (2024-11-15 10:25:24)

@TwoFX
Copy link
Member Author

TwoFX commented Nov 15, 2024

!bench

@github-actions github-actions bot temporarily deployed to lean-lang.org/lean4/doc November 15, 2024 12:02 Inactive
@leanprover-bot
Copy link
Collaborator

Here are the benchmark results for commit e6ca7b5.
There were significant changes against commit a074bd9:

  Benchmark                   Metric          Change
  ===========================================================
- bv_decide_inequality.lean   branch-misses     1.2% (15.8 σ)
- bv_decide_mul               wall-clock        2.4% (11.6 σ)
- simp_arith1                 branch-misses     3.1% (20.3 σ)

@TwoFX TwoFX added this pull request to the merge queue Nov 15, 2024
Merged via the queue into master with commit 688ee4c Nov 15, 2024
15 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
changelog-compiler Compiler, runtime, and FFI toolchain-available A toolchain is available for this PR, at leanprover/lean4-pr-releases:pr-release-NNNN
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Nat.ble 0 0 evaluates to false, should be true
3 participants