Skip to content

LLVM is unable to allocate certain function returns on sparc-unknown-linux-gnu #80712

Closed
@AaronKutch

Description

@AaronKutch

Some time ago, compiler-builtins ran into an issue where the sparc-unknown-linux-gnu target was unable to handle functions that return (u128, u128). I made a temporary workaround in compiler-builtins and said that I would try to fix the underlying issue over winter break. There are currently two proposals for adding functions that return tuples of integers, rust-lang/rfcs#914 and I remember something about widening multiplication that returns a tuple (but I can't find it for some reason). The workaround I made in compiler-builtins will not work in those cases, since the function returning a tuple is directly in the public interface. Since sparc-unknown-linux-gnu is a tier 2.5 target important to some people, we need to fix the issue in LLVM ahead of time or implement some kind of lowering that leads to the same IR that clang generates. Unfortunately, I got distracted by other things and will not have time to dive into LLVM. I am opening this issue so that someone with more experience with LLVM internals can fix the issue. More details are in rust-lang/compiler-builtins#390 and rust-lang/rfcs#914 .

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-LLVMArea: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues.C-bugCategory: This is a bug.O-SPARCTarget: SPARC processorsT-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