[SimpleLoopUnswitch] Don't consider unswitching switch insructions with one unique successor

Only instructions with two or more unique successors should be considered for unswitching.

Patch Author: Daniil Suchkov.

Reviewers: reames, asbirlea, skatkov
Reviewed By: skatkov
Subscribers: hiraditya, llvm-commits
Differential Revision: https://reviews.llvm.org/D64404


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@365611 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Serguei Katkov
2019-07-10 10:25:22 +00:00
parent 035937569b
commit b0cd2ae668
2 changed files with 1 additions and 2 deletions
@@ -1,5 +1,4 @@
; REQUIRES: asserts
; XFAIL: *
; RUN: opt -passes='unswitch<nontrivial>' -disable-output -S < %s
; RUN: opt -simple-loop-unswitch -enable-nontrivial-unswitch -disable-output -S < %s