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

Sanjay Patel via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Dec 20 08:19:15 PST 2019


spatel created this revision.
spatel added reviewers: aqjune, efriedma, nlopes, lebedev.ri.
Herald added subscribers: hiraditya, mcrosier.
Herald added a project: LLVM.

We missed a constraint in D44833 <https://reviews.llvm.org/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


https://reviews.llvm.org/D71771

Files:
  llvm/lib/Transforms/InstCombine/InstructionCombining.cpp
  llvm/test/Transforms/InstCombine/gep-vector.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D71771.234904.patch
Type: text/x-patch
Size: 6583 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20191220/b75bfb22/attachment.bin>


More information about the llvm-commits mailing list