Implement a bunch of symbolic constant folding opportunities. This implements
authorChris Lattner <sabre@nondot.org>
Tue, 13 Jan 2004 05:51:55 +0000 (05:51 +0000)
committerChris Lattner <sabre@nondot.org>
Tue, 13 Jan 2004 05:51:55 +0000 (05:51 +0000)
commit504e8fb74e4eec97a2ee1c195026824468cb6f7f
tree5b5d6fb559ebe091d3d6a1e390345f119635fe9a
parent75d1412cc2a2665cbc36850695f250fb09284d7c
Implement a bunch of symbolic constant folding opportunities.  This implements
testcase test/Regression/Assembler/ConstantExprFold.llx

Note that these kinds of things only rarely show up in source code, but are
exceedingly common in the intermediate stages of algorithms like SCCP.  By
folding things (especially relational operators) that use symbolic constants,
we are able to speculatively fold more conditional branches, which can
lead to some big simplifications.

It would be easy to add a lot more special cases here, so if you notice
SCCP missing anything "obvious", you know what to make smarter.  :)

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10812 91177308-0d34-0410-b5e6-96231b3b80d8
lib/VMCore/ConstantFold.cpp