[all-commits] [llvm/llvm-project] 541344: [DFAJumpThreading] Do not thread over blocks with ...

Hongyu Chen via All-commits all-commits at lists.llvm.org
Tue Jun 16 00:42:14 PDT 2026


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 541344270fb67fc791f0231bab4fbd716c7594e2
      https://github.com/llvm/llvm-project/commit/541344270fb67fc791f0231bab4fbd716c7594e2
  Author: Hongyu Chen <xxs_chy at outlook.com>
  Date:   2026-06-16 (Tue, 16 Jun 2026)

  Changed paths:
    M llvm/lib/Transforms/Scalar/DFAJumpThreading.cpp
    A llvm/test/Transforms/DFAJumpThreading/single-block-defs.ll

  Log Message:
  -----------
  [DFAJumpThreading] Do not thread over blocks with multiple phi definitions (#195512)

Fixes #195088
For the reduced case in the issue, there are 4 threading paths:
```
< then, case2, lbl_entry, switch_bb > [ 0, case2 ]
< case2, lbl_entry, switch_bb > [ 0, case2 ]
< then, case2, switch_bb > [ 1, case2 ]
< case2, switch_bb > [ 0, case2 ]
```
But the first path and the third path have a conflict: `then->case2`
cannot be diverged into `then->case2.0` and `then->case2.1` at the same
time, as jumping from `then` to `case2` does not really define a unique
exiting state. Multiple phi definition causes two exiting states (0 and
1) for `then->case2`.
The root cause is that the block with multiple definitions cannot be
regarded as a determinator.



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