[llvm] [AMDGPU][NPM] Preserve analyses in AMDGPURewriteAGPRCopyMFMA for NPM (PR #170130)

Prasoon Mishra via llvm-commits llvm-commits at lists.llvm.org
Mon Dec 1 05:15:22 PST 2025


PrasoonMishra wrote:

Without this patch, the following lit test fail when NPM is enabled:
```
LLVM :: CodeGen/AMDGPU/rewrite-vgpr-mfma-to-agpr-phi.ll
LLVM :: CodeGen/AMDGPU/rewrite-vgpr-mfma-to-agpr.gfx90a.ll
LLVM :: CodeGen/AMDGPU/rewrite-vgpr-mfma-to-agpr.gfx950.ll
LLVM :: CodeGen/AMDGPU/rewrite-vgpr-mfma-to-agpr.ll
LLVM :: CodeGen/AMDGPU/unspill-vgpr-after-rewrite-vgpr-mfma.ll
LLVM :: CodeGen/AMDGPU/inflate-reg-class-vgpr-mfma-to-av-with-load-source.mir
```
This patch aligns the NPM behavior with the legacy pass manager (see [AMDGPURewriteAGPRCopyMFMA.cpp Line 608-611](https://github.com/llvm/llvm-project/blob/main/llvm/lib/Target/AMDGPU/AMDGPURewriteAGPRCopyMFMA.cpp#L608-#611)).

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


More information about the llvm-commits mailing list