OSDN Git Service

Revert "Revert r330403 and r330413."
authorMichael Zolotukhin <mzolotukhin@apple.com>
Fri, 20 Apr 2018 13:34:32 +0000 (13:34 +0000)
committerMichael Zolotukhin <mzolotukhin@apple.com>
Fri, 20 Apr 2018 13:34:32 +0000 (13:34 +0000)
commit1efc1f183874ffe065aeda85d3af8e61d8cb83aa
tree5e3fa48deca8f92e9b42b78404e2a838bb1848fd
parentf23938f2441d2d2caafb476ba6b24d381b4e8f1a
Revert "Revert r330403 and r330413."

Reapply the patches with a fix. Thanks Ilya and Hans for the reproducer!
This reverts commit r330416.

The issue was that removing predecessors invalidated uses that we stored
for rewrite. The fix is to finish manipulating with CFG before we select
uses for rewrite.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@330431 91177308-0d34-0410-b5e6-96231b3b80d8
include/llvm/Transforms/Utils/SSAUpdaterBulk.h
lib/Transforms/Scalar/JumpThreading.cpp
lib/Transforms/Utils/SSAUpdaterBulk.cpp
test/Transforms/JumpThreading/removed-use.ll [new file with mode: 0644]
unittests/Transforms/Utils/SSAUpdaterBulk.cpp