Repository navigation
Canonicalize more comparison operators - #165221
Merged
rust-bors[bot] merged 1 commit intoNov 13, 2026
Merged
rust-bors[bot] merged 1 commit into
rust-bors[bot] merged 1 commit into
Conversation
Collaborator
|
|
mu001999
commented
Oct 31, 2026
| StorageLive(_7); | ||
| _7 = PtrMetadata(copy _1); | ||
| _8 = Le(copy _4, move _7); | ||
| _8 = Ge(move _7, copy _4); |
Member
Author
There was a problem hiding this comment.
This is because ReorderLocals
This comment has been minimized.
This comment has been minimized.
mu001999
force-pushed
the
canonicalize-more-comparisons
branch
from
October 31, 2026 07:38
2a9a24f to
700179f
Compare
mu001999
marked this pull request as ready for review
October 31, 2026 13:47
Collaborator
|
Some changes occurred to MIR optimizations cc @rust-lang/wg-mir-opt |
dianqk
approved these changes
Nov 12, 2026
mu001999
force-pushed
the
canonicalize-more-comparisons
branch
from
November 12, 2026 15:00
700179f to
fe65b69
Compare
Collaborator
|
This PR was rebased onto a different main commit. Here's a range-diff highlighting what actually changed. Rebasing is a normal part of keeping PRs up to date, so no action is needed—this note is just to help reviewers. |
Member
|
Can you reproduce diff --git a/tests/mir-opt/pre-codegen/slice_iter.range_loop.runtime-optimized.after.panic-abort.mir b/tests/mir-opt/pre-codegen/slice_iter.range_loop.runtime-optimized.after.panic-abort.mir
index e817d9cd872..0fbeca458f4 100644
--- a/tests/mir-opt/pre-codegen/slice_iter.range_loop.runtime-optimized.after.panic-abort.mir
+++ b/tests/mir-opt/pre-codegen/slice_iter.range_loop.runtime-optimized.after.panic-abort.mir
@@ -56,7 +56,7 @@ fn range_loop(_1: &[T], _2: impl Fn(usize, &T)) -> () {
StorageLive(_6);
StorageLive(_5);
_5 = copy _4;
- _6 = Lt(move _5, copy _3);
+ _6 = Gt(copy _3, move _5);
StorageDead(_5);
switchInt(move _6) -> [0: bb2, otherwise: bb4];
}
@@ -81,7 +81,7 @@ fn range_loop(_1: &[T], _2: impl Fn(usize, &T)) -> () {
StorageLive(_9);
_9 = copy ((_8 as Some).0: usize);
StorageLive(_11);
- _10 = Lt(copy _9, copy _3);
+ _10 = Gt(copy _3, copy _9);
assert(move _10, "index out of bounds: the length is {} but the index is {}", copy _3, copy _9) -> [success: bb5, unwind unreachable];
} |
mu001999
force-pushed
the
canonicalize-more-comparisons
branch
from
November 12, 2026 15:56
fe65b69 to
3406af2
Compare
Member
|
@bors r+ |
Contributor
JonathanBrouwer
added a commit
to JonathanBrouwer/rust
that referenced
this pull request
Nov 12, 2026
…-comparisons, r=dianqk Canonicalize more comparison operators As a follow-up PR to rust-lang#163373 (comment) r? dianqk
rust-bors Bot
pushed a commit
that referenced
this pull request
Nov 13, 2026
…uwer Rollup of 12 pull requests Successful merges: - #164707 (Re-enable rustc profile generation for static linked llvm on Windows x64 builds ) - #165221 (Canonicalize more comparison operators) - #165880 (Remove dead code for returning `BackendRepr::Memory` with `PassMode::Direct`) - #164108 (Add unstable `-Zllvm-tpde` flag to `rustc_codegen_llvm`) - #165565 (view-types: lower view types from HIR) - #165771 (tests: cover MSVC ThinLTO exported symbol preservation) - #165810 (reflection: reflect attributes from adts, fields, and variants) - #165823 (Tweak crate error wording and turn them into fatal errors) - #165849 (More opt-dist improvements) - #165855 (Update `sysinfo` version to `0.40.3`) - #165861 (cg_llvm: Use an invariant lifetime brand for LLVM attributes) - #165872 (Some attribute related cleanups)
Member
|
Contributor
|
This pull request was unapproved. This PR was contained in a rollup (#165891), which was unapproved. |
This comment has been minimized.
This comment has been minimized.
rust-bors Bot
pushed a commit
that referenced
this pull request
Nov 13, 2026
…s, r=<try> Canonicalize more comparison operators try-job: test-various
Contributor
|
💔 Test for 50de34e failed: CI. Failed job:
|
This comment has been minimized.
This comment has been minimized.
mu001999
force-pushed
the
canonicalize-more-comparisons
branch
from
November 13, 2026 05:29
3406af2 to
cac2cbf
Compare
Member
Author
|
@bors try jobs=test-various |
This comment has been minimized.
This comment has been minimized.
rust-bors Bot
pushed a commit
that referenced
this pull request
Nov 13, 2026
…s, r=<try> Canonicalize more comparison operators try-job: test-various
Contributor
Member
Author
|
@bors r=dianqk |
Contributor
JonathanBrouwer
added a commit
to JonathanBrouwer/rust
that referenced
this pull request
Nov 13, 2026
…-comparisons, r=dianqk Canonicalize more comparison operators As a follow-up PR to rust-lang#163373 (comment) r? dianqk
rust-bors Bot
pushed a commit
that referenced
this pull request
Nov 13, 2026
…uwer Rollup of 18 pull requests Successful merges: - #164828 (When suggesting path of renamed crate, use the renamed name) - #164864 (Avoid hoisting uninitialized reads in EarlyOtherwiseBranch) - #165068 (Change color usage for highlights) - #165221 (Canonicalize more comparison operators) - #165841 (Tell Miri about the alignment handling in the Windows System allocator) - #165869 (Cleanup: Remove `path_matches` and `value_str` from `AttributeExt`) - #165880 (Remove dead code for returning `BackendRepr::Memory` with `PassMode::Direct`) - #164108 (Add unstable `-Zllvm-tpde` flag to `rustc_codegen_llvm`) - #165565 (view-types: lower view types from HIR) - #165622 (small cleanups in rustc_codegen_llvm) - #165745 (Don't ICE when a guard condition is a place of type `!`) - #165771 (tests: cover MSVC ThinLTO exported symbol preservation) - #165810 (reflection: reflect attributes from adts, fields, and variants) - #165823 (Tweak crate error wording and turn them into fatal errors) - #165849 (More opt-dist improvements) - #165855 (Update `sysinfo` version to `0.40.3`) - #165872 (Some attribute related cleanups) - #165905 (CI: Use a consistent locale when sorting docker build inputs)
rust-bors Bot
pushed a commit
that referenced
this pull request
Nov 13, 2026
…uwer Rollup of 17 pull requests Successful merges: - #164828 (When suggesting path of renamed crate, use the renamed name) - #164864 (Avoid hoisting uninitialized reads in EarlyOtherwiseBranch) - #165068 (Change color usage for highlights) - #165221 (Canonicalize more comparison operators) - #165841 (Tell Miri about the alignment handling in the Windows System allocator) - #165869 (Cleanup: Remove `path_matches` and `value_str` from `AttributeExt`) - #165880 (Remove dead code for returning `BackendRepr::Memory` with `PassMode::Direct`) - #164108 (Add unstable `-Zllvm-tpde` flag to `rustc_codegen_llvm`) - #165565 (view-types: lower view types from HIR) - #165622 (small cleanups in rustc_codegen_llvm) - #165771 (tests: cover MSVC ThinLTO exported symbol preservation) - #165810 (reflection: reflect attributes from adts, fields, and variants) - #165823 (Tweak crate error wording and turn them into fatal errors) - #165849 (More opt-dist improvements) - #165855 (Update `sysinfo` version to `0.40.3`) - #165872 (Some attribute related cleanups) - #165905 (CI: Use a consistent locale when sorting docker build inputs)
rust-bors Bot
pushed a commit
that referenced
this pull request
Nov 13, 2026
Rollup merge of #165221 - mu001999-contrib:canonicalize-more-comparisons, r=dianqk Canonicalize more comparison operators As a follow-up PR to #163373 (comment) r? dianqk
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
As a follow-up PR to #163373 (comment)
r? dianqk