[llvm] [AIX] Handle arbitrary sized integers when lowering formal arguments passed on the stack (PR #149351)

Amy Kwan via llvm-commits llvm-commits at lists.llvm.org
Thu Jul 17 09:26:01 PDT 2025


amy-kwan wrote:

A couple notes and observations:
- https://github.com/rust-lang/rust/blob/master/compiler/rustc_target/src/callconv/mod.rs#L800 is where the rust frontend generates an immediate for small structures less than a pointer size. It seems than any structures that are larger than a pointer size will generate `ptr` instead in the IR. This is only done for the Rust ABI. I've taken a look previously, and if we are using the C ABI from Rust, we generate `byval` for structures instead, which should be expected.
- The NVPTX backend ran into this similar situation when lowering calls. Specifically, they encountered an `i24` type that came from the rust frontend, exactly in the case where we have a struct with three characters, where https://github.com/llvm/llvm-project/issues/55764 describes this situation in detail. A sign or zero extend appears to be done for this case, regardless if an extend is found on the parameter.
- Non-simple types like `i24` without an extend on the function parameter has also been seen on PPC64LE: https://github.com/llvm/llvm-project/commit/354d3106c6a9d6de824ee7ffa501387592b15afa

https://github.com/llvm/llvm-project/pull/149351


More information about the llvm-commits mailing list