[PATCH] Fix aliasing issue caused by MemCpyOptimizer (PR18304)

David Wiberg dwiberg at gmail.com
Mon Jun 23 08:12:14 PDT 2014


2014-06-23 10:05 GMT+02:00 Nick Lewycky <nicholas at mxc.ca>:
> David Wiberg wrote:
>>
>> Hello,
>>
>> The attached patch fixes an aliasing issue caused by MemCpyOptimizer
>> by performing the following changes:
>> - Added requirement that the callee does not capture the src pointer for
>>    the transformation to apply.
>> - Updated test cases by adding nocapture attributes where applicable
>>
>> See http://lists.cs.uiuc.edu/pipermail/llvmdev/2014-June/073819.html
>> for some more information. My main concern is performance regressions
>> but I haven't been able to get any benchmark results.
>
>
> You updated the tests, but please include a "negative test" for something
> that gets miscompiled without your code change.
>
> Nick

Hi Nick,

The test case added in the second version of the patch
(capturing-func.ll) fails without my code change. If this is not what
you mean I would appreciate if you could provide more details.

David



More information about the llvm-commits mailing list