[llvm] [AMDGPU][NewPass] Attempt to promote uniform ptr arguments to inreg (PR #210410)

Akash Dutta via llvm-commits llvm-commits at lists.llvm.org
Wed Sep 30 11:47:23 PDT 2026


akadutta wrote:

Fixed two cases that produced invalid IR:

- **Call-site parameter attributes.** A call site can carry `byval`/`byref`/`nest`/etc. when the callee's declaration does not. Before, eligibility was only checked on the declaration, so `inreg` got added alongside them. Each call site's own attributes are now checked.

- **`musttail` inside the promoted callee.** The verifier compares ABI-impacting parameter attributes positionally between a `musttail` caller and its callee, so promoting *any* parameter of a function containing a `musttail` call breaks it — including parameters not forwarded to that call. The existing `isMustTailCall()` check only saw `musttail` calls *to* the function. Such functions are now rejected outright.

Tests added for both.

Comment generated by Claude.

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


More information about the llvm-commits mailing list