Files
llvm-project/llvm/lib/CodeGen/TailDuplicator.cpp
Ralender 5a155740c8 [TailDuplicator] Fix miss-compile with PHI referencing each other in TailBB (#194832)
Here is an example of when it happens
```
PredBB:
  A = add P0, 1
  ...
  BR TailBB

TailBB:
  P0 = PHI [A, PredBB]...
  P1 = PHI [P0, PredBB] ...
  BR PredBB, ...
```
when re-writing the PHIs, P1 would be replaced in TailBB with A instead
of P0 at the entry of PredBB
2026-04-30 18:28:01 +02:00

41 KiB