[all-commits] [llvm/llvm-project] 6b4b1d: [LoopUnswitch] Simplify branch condition if it is ...

Juneyoung Lee via All-commits all-commits at lists.llvm.org
Tue Mar 30 04:10:07 PDT 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 6b4b1dc6ec6f0bf0a1bb414fbe751ccab99d41a0
      https://github.com/llvm/llvm-project/commit/6b4b1dc6ec6f0bf0a1bb414fbe751ccab99d41a0
  Author: Juneyoung Lee <aqjune at gmail.com>
  Date:   2021-03-30 (Tue, 30 Mar 2021)

  Changed paths:
    M llvm/lib/Transforms/Scalar/SimpleLoopUnswitch.cpp
    M llvm/test/Transforms/SimpleLoopUnswitch/nontrivial-unswitch.ll

  Log Message:
  -----------
  [LoopUnswitch] Simplify branch condition if it is select with constant operands

This fixes the miscompilation reported in https://reviews.llvm.org/rG5bb38e84d3d0#986154 .

`select _, true, false` matches both m_LogicalAnd and m_LogicalOr, making later
transformations confused.
Simplify the branch condition to not have the form.




More information about the All-commits mailing list