[llvm-commits] [PATCH] fix infinite loop in instcombine with more than 4GB memcpy

Michael Liao michael.liao at intel.com
Tue Aug 14 17:30:25 PDT 2012


Hi

Please review the patch fixing a possible infinite loop in instcombine
if memcpy size is larger than 4GB. The root cause is that memcpy size is
wrongly truncated into 32-bit instead of 64-bit.

The other changes includes replacing 0-checking with assertion as
0-sized memcpy/set is already removed in visitCallInst before calling
into memcpy/set simplification. The other reason is that returning the
same inst won't cause memcpy/set removed as they are not trivially dead
inst.

Test case is revised.

Yours
- Michael

-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-fix-infinite-loop-in-instcombine-with-more-than-4GB-.patch
Type: text/x-patch
Size: 2871 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20120814/1136efd5/attachment.bin>


More information about the llvm-commits mailing list