[all-commits] [llvm/llvm-project] a50bd0: [RemoveDIs] Replicate dbg intrinsic movement patte...

Orlando Cazalet-Hyams via All-commits all-commits at lists.llvm.org
Wed Feb 14 06:48:27 PST 2024


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: a50bd0d799e3f3fbb759ab842691a0bb570f8614
      https://github.com/llvm/llvm-project/commit/a50bd0d799e3f3fbb759ab842691a0bb570f8614
  Author: Orlando Cazalet-Hyams <orlando.hyams at sony.com>
  Date:   2024-02-14 (Wed, 14 Feb 2024)

  Changed paths:
    M llvm/lib/CodeGen/SelectOptimize.cpp
    A llvm/test/DebugInfo/AArch64/select-optimize-trailing-dbg-records.ll

  Log Message:
  -----------
  [RemoveDIs] Replicate dbg intrinsic movement pattern in SelectOptimize (#81737)

Fix crash mentioned in comments on
d759618df76361a8e490eeae5c5399e0738cbfd0.

The assertion being hit was complaining that we had dangling DPValues;
the DPValues attached to the terminator of StartBlock become dangling
after the terminator is erased, and they're never "flushed" back onto
the new terminator once it's added. Doing that makes the crash go away,
but doesn't replicate existing dbg.* behaviour. See the comment in the
patch.

This change both fixes the crash (because there are now no DPValues left
on the terminator to dangle) and replicates existing behaviour (moves
those DPValues down to the new block).




More information about the All-commits mailing list