[all-commits] [llvm/llvm-project] d4a38c: [DFAJumpThreading] Handle select unfolding when us...

Usman Nadeem via All-commits all-commits at lists.llvm.org
Tue Sep 24 08:54:59 PDT 2024


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: d4a38c8ff5c993e14c42895b51a47272fb03a857
      https://github.com/llvm/llvm-project/commit/d4a38c8ff5c993e14c42895b51a47272fb03a857
  Author: Usman Nadeem <mnadeem at quicinc.com>
  Date:   2024-09-24 (Tue, 24 Sep 2024)

  Changed paths:
    M llvm/lib/Transforms/Scalar/DFAJumpThreading.cpp
    M llvm/test/Transforms/DFAJumpThreading/dfa-jump-threading-transform.ll

  Log Message:
  -----------
  [DFAJumpThreading] Handle select unfolding when user phi is not a dir… (#109511)

…ect successor

Previously the code assumed that the select instruction is defined in a
block that is a direct predecessor of the block where the PHINode uses
it. So, we were hitting an assertion when we tried to access the def
block as an incoming block for the user phi node.

This patch handles that case by using the correct end block and creating
a new phi node that aggregates both the values of the select in that end
block, and then using that new unfolded phi to overwrite the original
user phi node.

Fixes #106083

Change-Id: Ie471994cca232318f74a6e6438efa21e561c2dc0



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