[JumpThreading] A bug fix for stale loop info after unfold select
authorHiroshi Yamauchi <yamauchi@google.com>
Wed, 15 May 2019 15:15:16 +0000 (15:15 +0000)
committerHiroshi Yamauchi <yamauchi@google.com>
Wed, 15 May 2019 15:15:16 +0000 (15:15 +0000)
commit7dfd087a9a59443b6dde9cb4e8763c55fbd23edb
tree05a76718cddcdee4c50a141acee33e92b279e78e
parent7f7dd09001301edf328b7e01c30c8bb03bdc8c57
[JumpThreading] A bug fix for stale loop info after unfold select

Summary:
The return value of a TryToUnfoldSelect call was not checked, which led to an
incorrectly preserved loop info and some crash.

The original crash was reported on https://reviews.llvm.org/D59514.

Reviewers: davidxl, amehsan

Reviewed By: davidxl

Subscribers: fhahn, brzycki, llvm-commits

Tags: #llvm

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

llvm-svn: 360780
llvm/lib/Transforms/Scalar/JumpThreading.cpp
llvm/test/Transforms/JumpThreading/stale-loop-info-after-unfold-select.ll [new file with mode: 0644]