[SimpleLoopUnswitch] Add a test case exposing a bug
authorSerguei Katkov <serguei.katkov@azul.com>
Wed, 10 Jul 2019 08:25:48 +0000 (08:25 +0000)
committerSerguei Katkov <serguei.katkov@azul.com>
Wed, 10 Jul 2019 08:25:48 +0000 (08:25 +0000)
commit97f19f3a4970b33c9ff2bc210ea4634a8bf0988e
treefe5d29235abc2a51adbd40c7e3da07e103580963
parent625a0f70a9886d9f652a9c85b29c0e1765c17361
[SimpleLoopUnswitch] Add a test case exposing a bug

This test exposes a bug in SimpleLoopUnswitch that leads to a crash on
assert(SuccessorsCount > 1 && "Cannot unswitch a condition without multiple distinct successors!");
when SimpleLoopUnswitch considers unswitching of a loop by a switch with one successor.

Fix will be submitted soon.

Patch Author: Daniil Suchkov.

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

llvm-svn: 365600
llvm/test/Transforms/SimpleLoopUnswitch/nontrivial-unswitch-redundant-switch.ll [new file with mode: 0644]