Skip to content

[cg_ssa] TerminatorCodegenHelper::do_call assumes that destination doesnt have more than one predecessor #67161

Open
@bjorn3

Description

@bjorn3

if let Some((ret_dest, target)) = destination {
let mut ret_bx = fx.build_block(target);
fx.set_debug_loc(&mut ret_bx, self.terminator.source_info);
fx.store_return(&mut ret_bx, ret_dest, &fn_abi.ret, invokeret);
}

It appends the ret value storage code directly to the destination bb. This means that if two calls have the same destination, the destination bb will contain the ret value storage code for both calls.

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-codegenArea: Code generationA-craneliftThings relevant to the [future] cranelift backendC-bugCategory: This is a bug.T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions