[PATCH] fix PR17906, a bug in ArgumentPromotion

Manman Ren manman.ren at gmail.com
Thu Nov 14 13:59:25 PST 2013


We used to use std::map<IndicesVector, LoadInst*> for OriginalLoads, and
when we try to promote two arguments, they will both write to OriginalLoads
causing created loads for the two arguments to have the same original load.
And the same tbaa tag and alignment will be put to the created loads for
the two arguments.


The fix is to use std::map<std::pair<Argument*, IndicesVector>, LoadInst*>
for OriginalLoads, so each Argument will write to different parts of the
map.


Please review,


Thanks,

Manman
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20131114/954dadf7/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-ArgumentPromotion-correctly-transfer-TBAA-tags-and-a.patch
Type: application/octet-stream
Size: 5650 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20131114/954dadf7/attachment.obj>


More information about the llvm-commits mailing list