[PATCH] Simplify (X ^ signbit) + C
David Majnemer
david.majnemer at gmail.com
Mon May 6 13:15:07 PDT 2013
Cases like (X - (1 << 31)) + C or (X ^ (1 << 31)) + C do not get constant
folding.
The attached patch reassociates the instruction operands so that we get:
(X - ((1 << 31) - C)).
--
David Majnemer
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20130506/9aa39e08/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: fold-signbit-arith.diff
Type: application/octet-stream
Size: 1165 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20130506/9aa39e08/attachment.obj>
More information about the llvm-commits
mailing list