[all-commits] [llvm/llvm-project] 1f88d8: [SCCP] Don't mark edges feasible when resolving un...

Nikita Popov via All-commits all-commits at lists.llvm.org
Wed Jun 22 01:28:45 PDT 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 1f88d804083a8a1b68df1e6677920e38ab2a6b40
      https://github.com/llvm/llvm-project/commit/1f88d804083a8a1b68df1e6677920e38ab2a6b40
  Author: Nikita Popov <npopov at redhat.com>
  Date:   2022-06-22 (Wed, 22 Jun 2022)

  Changed paths:
    M llvm/lib/Transforms/Scalar/SCCP.cpp
    M llvm/lib/Transforms/Utils/SCCPSolver.cpp
    M llvm/test/Transforms/FunctionSpecialization/bug52821-use-after-free.ll
    M llvm/test/Transforms/FunctionSpecialization/bug55000-read-uninitialized-value.ll
    M llvm/test/Transforms/SCCP/2004-12-10-UndefBranchBug.ll
    M llvm/test/Transforms/SCCP/2008-01-27-UndefCorrelate.ll
    M llvm/test/Transforms/SCCP/PR26044.ll
    M llvm/test/Transforms/SCCP/indirectbr.ll
    M llvm/test/Transforms/SCCP/ipsccp-branch-unresolved-undef.ll
    M llvm/test/Transforms/SCCP/return-zapped.ll
    M llvm/test/Transforms/SCCP/switch-constantfold-crash.ll
    M llvm/test/Transforms/SCCP/switch-undef-constantfoldterminator.ll

  Log Message:
  -----------
  [SCCP] Don't mark edges feasible when resolving undefs

As branch on undef is immediate undefined behavior, there is no need
to mark one of the edges as feasible. We can leave all the edges
non-feasible. In IPSCCP, we can replace the branch with an unreachable
terminator.

Differential Revision: https://reviews.llvm.org/D126962




More information about the All-commits mailing list