[llvm-commits] [pr12979][patch/rfc] Clear nsw/nuw in gvn

Rafael EspĂ­ndola rafael.espindola at gmail.com
Tue May 29 09:35:04 PDT 2012


I can see two ways of fixing pr12979. On is giving different numbers
to 'add' and 'add nsw'. Another one is patching the replacement to
make it at least as general as the value being replaced.

I went with the second option, since we probably want to combined the
two instructions at some point once potential uses of the nsw bit have
been exploited.

The patch is incomplete since I am not sure what is the best thing to
do about the metadata.

If I understand the code correctly, loads are handled in a different
location, so we don't have to worry about range and tbaa in here. For
fpmath I think we should keep the most precise of the two.

For debug info, it is probably better to keep the info attached to the
replacement.

What should we do with unknown metadata types? I think we have to drop
it, but I don't know if there was a decision on some other merging
rules.

Cheers,
Rafael
-------------- next part --------------
A non-text attachment was scrubbed...
Name: t.patch
Type: application/octet-stream
Size: 3016 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20120529/d6108a80/attachment.obj>


More information about the llvm-commits mailing list