[GVN] Fix a crash bug w/non-integral pointers and memtransfers
authorPhilip Reames <listmail@philipreames.com>
Tue, 19 Feb 2019 23:49:38 +0000 (23:49 +0000)
committerPhilip Reames <listmail@philipreames.com>
Tue, 19 Feb 2019 23:49:38 +0000 (23:49 +0000)
commit952d234d00b1e67a2d51e3d13ac734a9e2e99f3c
treeef51b66a4484eb238213c726e237fa4f310cb966
parentbdbbfdc8c2f60947dd149c59879af2e1fb56cd75
[GVN] Fix a crash bug w/non-integral pointers and memtransfers

Problem is very similiar to the one fixed for memsets in r354399, we try to coerce a value to non-integral type, and then crash while try to do so.  Since we shouldn't be doing such coercions to start with, easy fix.  From inspection, I see two other cases which look to be similiar and will follow up with most test cases and fixes if confirmed.

llvm-svn: 354403
llvm/lib/Transforms/Utils/VNCoercion.cpp
llvm/test/Transforms/GVN/non-integral-pointers.ll