[PATCH] PR17473: Disallow LSR to perform non-invertible normalization

Michael Zolotukhin mzolotukhin at apple.com
Mon Mar 10 14:56:10 PDT 2014


This is a fix for PR17473. The issue is that LSR performs normalization of detected IV users and sometimes wants to denormalize it back hoping to get the original expression. But normalization isn’t always invertible, and the new expression might be not equivalent to the original one. In the test case, we were losing sign-extension in such transformation. The patch simply adds a check, if the transformation is invertible. 

-------------- next part --------------
A non-text attachment was scrubbed...
Name: pr17473.patch
Type: application/octet-stream
Size: 5614 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20140310/ed1c74f7/attachment.obj>
-------------- next part --------------

Ok for trunk?


More information about the llvm-commits mailing list