Page MenuHomePhabricator

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

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



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:

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.