Page MenuHomePhabricator

[SROA] Fix a crash when trying to convert a memset to an non-integral pointer type
ClosedPublic

Authored by reames on Mar 5 2019, 2:55 PM.

Details

Summary

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.

Diff Detail

Repository
rL LLVM

Event Timeline

reames created this revision.Mar 5 2019, 2:55 PM
Herald added a project: Restricted Project. · View Herald TranscriptMar 5 2019, 2:55 PM
cherry accepted this revision.Mar 5 2019, 6:43 PM

Looks good to me. Thanks!

This revision is now accepted and ready to land.Mar 5 2019, 6:43 PM
This revision was automatically updated to reflect the committed changes.