]> granicus.if.org Git - llvm/commit
[SROA] Fix a crash when trying to convert a memset to an non-integral pointer type
authorPhilip Reames <listmail@philipreames.com>
Tue, 12 Mar 2019 20:15:05 +0000 (20:15 +0000)
committerPhilip Reames <listmail@philipreames.com>
Tue, 12 Mar 2019 20:15:05 +0000 (20:15 +0000)
commit1ca9798456a7214cc2ae574470ce814e1c697632
treef0eb37b0570606ab320848e374dbf29d94ed2285
parent283655fcc30fd4b72ef43e3e1f75683b1170cb43
[SROA] Fix a crash when trying to convert a memset to an non-integral pointer type

The included test case currently crashes on tip of tree. Rather than adding a bailout, I chose to restructure the code so that the existing helper function could be used. Given that, the majority of the diff is NFC-ish, but the key difference is that canConvertValue returns false when only one side is a non-integral pointer.

Thanks to Cherry Zhang for the test case.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@355962 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Transforms/Scalar/SROA.cpp
test/Transforms/SROA/non-integral-pointers.ll