Fix crash in PRE.
authorErik Verbruggen <erikjv@me.com>
Tue, 11 Mar 2014 15:07:32 +0000 (15:07 +0000)
committerErik Verbruggen <erikjv@me.com>
Tue, 11 Mar 2014 15:07:32 +0000 (15:07 +0000)
commit0638609d66d05b5aaa18e9dafa844765d9ce88e3
treef57d6b351a1ec2f323eca0fdda466f5679d41b52
parentd111694af25d35e5adc0bf103f5975fce4c46501
Fix crash in PRE.

After r203553 overflow intrinsics and their non-intrinsic (normal)
instruction get hashed to the same value. This patch prevents PRE from
moving an instruction into a predecessor block, and trying to add a phi
node that gets two different types (the intrinsic result and the
non-intrinsic result), resulting in a failing assert.

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