Fix bug 25440: GVN assertion after coercing loads
authorWeiming Zhao <weimingz@codeaurora.org>
Thu, 19 Nov 2015 02:45:18 +0000 (02:45 +0000)
committerWeiming Zhao <weimingz@codeaurora.org>
Thu, 19 Nov 2015 02:45:18 +0000 (02:45 +0000)
Optimizations like LoadPRE in GVN will insert new instructions.
If the insertion point is in a already processed BB, they should
get a value number explicitly. If the insertion point is after
current instruction, then just leave it. However, current GVN framework
has no support for it.
In this patch, we just bail out if a VN can't be found.

Dfferential Revision: http://reviews.llvm.org/D14670

A    test/Transforms/GVN/pr25440.ll
M    lib/Transforms/Scalar/GVN.cpp

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@253536 91177308-0d34-0410-b5e6-96231b3b80d8


No differences found