[all-commits] [llvm/llvm-project] 1fc425: [InstCombine] Handle undef when pruning unreachabl...

Nikita Popov via All-commits all-commits at lists.llvm.org
Fri May 26 06:59:23 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 1fc425380e9860a6beb53fa68d02e7fb14969963
      https://github.com/llvm/llvm-project/commit/1fc425380e9860a6beb53fa68d02e7fb14969963
  Author: Nikita Popov <npopov at redhat.com>
  Date:   2023-05-26 (Fri, 26 May 2023)

  Changed paths:
    M llvm/lib/Transforms/InstCombine/InstructionCombining.cpp
    M llvm/test/Transforms/InstCombine/unreachable-code.ll

  Log Message:
  -----------
  [InstCombine] Handle undef when pruning unreachable code

If the branch condition is undef, then behavior is undefined and
neither of the successors are live.

This is to ensure that optimization quality does not decrease
when a constant gets replaced with undef/poison in this context.




More information about the All-commits mailing list