Skip to content

Commit 6eae704

Browse files
authored
Rollup merge of rust-lang#145651 - borsakv:139093, r=cjgillot
Regression test for const promotion with Option<Ordering> https://rust.godbolt.org/z/EjxqE8WcT Fixes rust-lang#139093 Add a regression test to ensure that comparing `Option<Ordering>` to `Some(Ordering::Equal)` does not trigger unnecessary const promotion in MIR. Previously, inlined constants like `Some(Ordering::Equal)` would get promoted, leading to more complex MIR and redundant LLVM IR checks. This test verifies that both the direct form and the `let`-binding form now generate equivalent, simplified MIR. r? cjgillot
2 parents ce4a734 + ec48091 commit 6eae704

File tree

0 file changed

+0
-0
lines changed

    0 file changed

    +0
    -0
    lines changed

    0 commit comments

    Comments
     (0)