[llvm] [AMDGPU] Preserve all analyses if nothing changed (PR #117994)

Jay Foad via llvm-commits llvm-commits at lists.llvm.org
Thu Nov 28 03:33:46 PST 2024


================
@@ -2303,10 +2303,12 @@ PreservedAnalyses AMDGPUCodeGenPreparePass::run(Function &F,
   SIModeRegisterDefaults Mode(F, *Impl.ST);
   Impl.HasFP32DenormalFlush =
       Mode.FP32Denormals == DenormalMode::getPreserveSign();
+  if (!Impl.run(F))
----------------
jayfoad wrote:

The old code was checking `Impl.FlowChanged` before calling `Impl.run` which seems completely wrong.

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


More information about the llvm-commits mailing list