OSDN Git Service

[GVN] Prevent ScalarPRE from hoisting across instructions that don't pass control...
authorMax Kazantsev <max.kazantsev@azul.com>
Tue, 28 Nov 2017 07:07:55 +0000 (07:07 +0000)
committerMax Kazantsev <max.kazantsev@azul.com>
Tue, 28 Nov 2017 07:07:55 +0000 (07:07 +0000)
commitf7019c8d319fc3995c2f28251190f27fd63ec333
tree7ed45dacf0adb84650d4ec4b31acd56f76298308
parent965e7876c317bbe49750331b157d1ef2bbfcb159
[GVN] Prevent ScalarPRE from hoisting across instructions that don't pass control flow to successors

This is to address a problem similar to those in D37460 for Scalar PRE. We should not
PRE across an instruction that may not pass execution to its successor unless it is safe
to speculatively execute it.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@319147 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Transforms/Scalar/GVN.cpp
test/Transforms/GVN/PRE/local-pre.ll