Skip to content

Code size regression (opt-level=z) after 1.73.0 (~40%) #132887

Open
@dcci

Description

@dcci

Code:

#![no_main]
#[no_mangle]
pub fn f(a: i32) -> i32 {
    let mut result = a + a;
    for i in 0..a {
        for j in 0..a {
            if i * j % 2 == 0 && i + j > a / 2 {
                result += i + j;
            }
            for k in 0..a {
                if (i + j + k) % 3 == 0 && (i * j * k) % 2 != 0 {
                    result += k * (i + j);
                }
            }
        }
    }
    result
}

Link: https://godbolt.org/z/cW5KK4ab8

Metadata

Metadata

Assignees

No one assigned

    Labels

    C-bugCategory: This is a bug.I-heavyIssue: Problems and improvements with respect to binary size of generated code.P-lowLow priorityT-compilerRelevant to the compiler team, which will review and decide on the PR/issue.regression-untriagedUntriaged performance or correctness regression.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions