Skip to content

Fix stack probing for x32 #59674

Closed
Closed
@crlf0710

Description

@crlf0710

I've got a Rust minimal repro code (a.rs), its mir output (a.mir), its x86 codegen output (a.x86.ll) and its gnu-x32 codegen output (a.gnux32.ll) All these files are in this this gist.

Currently, llc a.gnux32.ll fails, saying "llvm error cannot emit physreg copy instruction".
I don't understand llvm ir at all myself, but i tried commenting out L309, L311 & L314 out (all accessing a special 'variable?' called 'unsized_tmp') and llc it passes, then i uncomment L309 and llc fails again.

This issue is blocking #59500. Maybe @eddyb, @oli-obk or someone else who's familiar with rust/src/librustc_codegen_ssa/mir/operand.rs could have a look or give me a hint about this?

Metadata

Metadata

Assignees

Labels

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