aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/CodeGen/BasicBlockSections.cpp
diff options
context:
space:
mode:
authorKjetil Kjeka <kjetilkjeka@gmail.com>2022-07-22 13:59:11 -0700
committerArtem Belevich <tra@google.com>2022-07-22 14:14:12 -0700
commitff1920d106b5286085eb50233a444154a653b0d0 (patch)
treea2675d3551595fa61a3d58099331081bf11b77f2 /llvm/lib/CodeGen/BasicBlockSections.cpp
parent35029d8374bcd4e9c813a430f075081e8d3ff25c (diff)
downloadllvm-ff1920d106b5286085eb50233a444154a653b0d0.zip
llvm-ff1920d106b5286085eb50233a444154a653b0d0.tar.gz
llvm-ff1920d106b5286085eb50233a444154a653b0d0.tar.bz2
[NVPTX] Promote i24, i40, i48 and i56 to next power-of-two register when passing
Today llc will crash when attempting to use non-power-of-two integer types as function arguments or returns. This patch enables passing non standard integer values in functions by promoting them before store and truncating after load. The main motivation of implementing this change is that rust casts small structs (less than pointer size) into an integer of the same size. As an example, if a struct contains three u8 then it will be passed as an i24. This patch is a step towards enabling rust compilation to ptx while retaining the target independent optimizations. More context can be found in https://github.com/llvm/llvm-project/issues/55764 Differential Revision: https://reviews.llvm.org/D129291
Diffstat (limited to 'llvm/lib/CodeGen/BasicBlockSections.cpp')
0 files changed, 0 insertions, 0 deletions