[llvm] [AMDGPU] AMDGPULateCodeGenPrepare Legacy PM: replace `setPreservesAll()` with `setPreservesCFG()` (PR #148167)

Nicolai Hähnle via llvm-commits llvm-commits at lists.llvm.org
Fri Jul 11 11:59:10 PDT 2025


================
@@ -546,7 +546,9 @@ class AMDGPULateCodeGenPrepareLegacy : public FunctionPass {
     AU.addRequired<TargetPassConfig>();
     AU.addRequired<AssumptionCacheTracker>();
     AU.addRequired<UniformityInfoWrapperPass>();
-    AU.setPreservesAll();
+    // This pass makes changes that can invalidate Uniformity Analysis,
+    // so don't setPreserveAll() here (see new PM version above).
+    AU.setPreservesCFG();
----------------
nhaehnle wrote:

Yes, that last follow-up comment is why I think the comment shouldn't be there.

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


More information about the llvm-commits mailing list