[all-commits] [llvm/llvm-project] 395c73: [SimplifyCFG] Update SimplifyBranchOnICmpChain to ...

Juneyoung Lee via All-commits all-commits at lists.llvm.org
Mon Jan 18 15:58:37 PST 2021


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: 395c737d9fcefb0fb99ac6c524b1d47e697d31d6
      https://github.com/llvm/llvm-project/commit/395c737d9fcefb0fb99ac6c524b1d47e697d31d6
  Author: Juneyoung Lee <aqjune at gmail.com>
  Date:   2021-01-19 (Tue, 19 Jan 2021)

  Changed paths:
    M llvm/lib/Transforms/Utils/SimplifyCFG.cpp
    M llvm/test/Transforms/SimplifyCFG/switch_create.ll

  Log Message:
  -----------
  [SimplifyCFG] Update SimplifyBranchOnICmpChain to recognize select form of and/or

This patch teaches SimplifyCFG::SimplifyBranchOnICmpChain to understand select form of
(x == C1 || x == C2 || ...) / (x != C1 && x != C2 && ...) and optimize them into switch if possible.
D93065 has more context about the transition, including links to the list of optimizations being updated.

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




More information about the All-commits mailing list