This is an archive of the discontinued LLVM Phabricator instance.

[InstCombine] check alloc size in bitcast of geps fold (PR44321)
ClosedPublic

Authored by spatel on Dec 20 2019, 8:12 AM.

Details

Summary

We missed a constraint in D44833 when folding a bitcast into a GEP with vector/array types.
If the alloc sizes specified by the datalayout don't match, this could miscompile as shown in:
https://bugs.llvm.org/show_bug.cgi?id=44321

Diff Detail

Event Timeline

spatel created this revision.Dec 20 2019, 8:12 AM
Herald added a project: Restricted Project. · View Herald TranscriptDec 20 2019, 8:12 AM
aqjune accepted this revision.Dec 20 2019, 10:50 AM
This revision is now accepted and ready to land.Dec 20 2019, 10:50 AM
This revision was automatically updated to reflect the committed changes.