[llvm] r286785 - [LangRef] Drop misleading anecdote

Sanjoy Das via llvm-commits llvm-commits at lists.llvm.org
Sun Nov 13 15:40:40 PST 2016


Author: sanjoy
Date: Sun Nov 13 17:40:40 2016
New Revision: 286785

URL: http://llvm.org/viewvc/llvm-project?rev=286785&view=rev
Log:
[LangRef] Drop misleading anecdote

`shl nsw i8 1, i8 8` is poison, but `mul i8 1, i8 128` is not.

This was discussed previously here:
http://lists.llvm.org/pipermail/llvm-dev/2015-April/084195.html.  From
the discussion, it was not clear which semantics we want for `shl`, but
for now at least make the language reference more accurate.

Modified:
    llvm/trunk/docs/LangRef.rst

Modified: llvm/trunk/docs/LangRef.rst
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/docs/LangRef.rst?rev=286785&r1=286784&r2=286785&view=diff
==============================================================================
--- llvm/trunk/docs/LangRef.rst (original)
+++ llvm/trunk/docs/LangRef.rst Sun Nov 13 17:40:40 2016
@@ -6430,9 +6430,7 @@ If the ``nuw`` keyword is present, then
 value <poisonvalues>` if it shifts out any non-zero bits. If the
 ``nsw`` keyword is present, then the shift produces a :ref:`poison
 value <poisonvalues>` if it shifts out any bits that disagree with the
-resultant sign bit. As such, NUW/NSW have the same semantics as they
-would if the shift were expressed as a mul instruction with the same
-nsw/nuw bits in (mul %op1, (shl 1, %op2)).
+resultant sign bit.
 
 Example:
 """"""""




More information about the llvm-commits mailing list