aboutsummaryrefslogtreecommitdiff
path: root/llvm/docs/tutorial
diff options
context:
space:
mode:
authorAmy Kwan <amy.kwan1@ibm.com>2025-08-01 08:01:26 -0400
committerGitHub <noreply@github.com>2025-08-01 08:01:26 -0400
commitf48a8da34292b367ba8a5e7b25065172df966848 (patch)
treea0a482ca769901b1a520364130c6d40a176c5ffa /llvm/docs/tutorial
parent1c5e6199a166b70ca9cd2329b6fb3d1d470022dd (diff)
downloadllvm-f48a8da34292b367ba8a5e7b25065172df966848.zip
llvm-f48a8da34292b367ba8a5e7b25065172df966848.tar.gz
llvm-f48a8da34292b367ba8a5e7b25065172df966848.tar.bz2
[AIX] Handle arbitrary sized integers when lowering formal arguments passed on the stack (#149351)
When arbitrary sized (non-simple type, or non-power of two types) integers are passed on the stack, these integers are not handled when lowering formal arguments on AIX as we always assume we will encounter simple type integers. However, it is possible for frontends to generate arbitrary sized immediate values in IR. Specifically in rustc, it will generate an integer value in LLVM IR for small structures that are less than a pointer size, which is done for optimization purposes for the Rust ABI. For example, if a Rust structure of three characters is passed into function on the stack, ``` struct my_struct { field1: u8, field2: u8, field3: u8, } ``` This will generate an `i24` type in LLVM IR. Currently, it is not obvious for the backend to distinguish an integer versus something that wasn't an integer to begin with (such as a struct), and the latter case would not have an extend on the parameter. Thus, this PR allows us to perform a truncation and extend on integers, both non-simple and simple types.
Diffstat (limited to 'llvm/docs/tutorial')
0 files changed, 0 insertions, 0 deletions