[NVPTX] Don't use underlying alignment to align param (#96793) Previously, if a ptr had align N, then the NVPTX lowering was taking this align N to refer to the alignment of the pointer type itself, as opposed to the alignment of the memory that it points to. As such, if a kernel with signature ``` define void @foo(ptr align 4 %_arg_ptr) ``` takes align 4 to be the alignment of the parameter, this would result in breaking the ld.param into two separate loads like so: ``` ld.param.u32 %rd1, [foo_param_0+4]; shl.b64 %rd2, %rd1, 32; ld.param.u32 %rd3, [foo_param_0]; or.b64 %rd4, %rd2, %rd3; ``` It isn't necessary as far as I can tell from the PTX ISA documents to specify the alignment of params, nor to break the loading of params into smaller loads based on their alignment. So this patch changes the codegen to the better: ``` ld.param.u64 %rd1, [foo_param_0]; ```
Welcome to the LLVM project!
This repository contains the source code for LLVM, a toolkit for the construction of highly optimized compilers, optimizers, and run-time environments.
The LLVM project has multiple components. The core of the project is itself called “LLVM”. This contains all of the tools, libraries, and header files needed to process intermediate representations and convert them into object files. Tools include an assembler, disassembler, bitcode analyzer, and bitcode optimizer.
C-like languages use the Clang frontend. This component compiles C, C++, Objective-C, and Objective-C++ code into LLVM bitcode -- and from there into object files, using LLVM.
Other components include: the libc++ C++ standard library, the LLD linker, and more.
Consult the Getting Started with LLVM page for information on building and running LLVM.
For information on how to contribute to the LLVM project, please take a look at the Contributing to LLVM guide.
Join the LLVM Discourse forums, Discord chat, LLVM Office Hours or Regular sync-ups.
The LLVM project has adopted a code of conduct for participants to all modes of communication within the project.