[all-commits] [llvm/llvm-project] f9f68a: [SCEV] Make sure LCSSA is preserved when re-using ...

Florian Hahn via All-commits all-commits at lists.llvm.org
Mon Jul 28 08:25:39 PDT 2025


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: f9f68af4b8d5f8dd0bf8f14174b8b223fcf54c97
      https://github.com/llvm/llvm-project/commit/f9f68af4b8d5f8dd0bf8f14174b8b223fcf54c97
  Author: Florian Hahn <flo at fhahn.com>
  Date:   2025-07-28 (Mon, 28 Jul 2025)

  Changed paths:
    M llvm/lib/Transforms/Utils/ScalarEvolutionExpander.cpp
    M llvm/test/Transforms/LoopIdiom/reuse-lcssa-phi-scev-expansion.ll
    A llvm/test/Transforms/LoopUnroll/Hexagon/reuse-lcssa-phi-scev-expansion.ll

  Log Message:
  -----------
  [SCEV] Make sure LCSSA is preserved when re-using phi if needed.

If we insert a new add instruction, it may introduce a new use outside
the loop that contains the phi node we re-use. Use fixupLCSSAFormFor to
fix LCSSA form, if needed.

This fixes a crash reported in
https://github.com/llvm/llvm-project/pull/147824#issuecomment-3124670997.



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list