[Bug 24848] Use range metadata to constant fold comparisons between two values
authorChen Li <meloli87@gmail.com>
Sat, 26 Sep 2015 03:26:47 +0000 (03:26 +0000)
committerChen Li <meloli87@gmail.com>
Sat, 26 Sep 2015 03:26:47 +0000 (03:26 +0000)
commit9cc82f0382e6fa5d35c4fbb0a18c1106dab1d7a8
treeffbd7aa93c227e60d4ae11d379d410c20d1649e6
parentc03102ae772ca933efb3e5c65f5fc3e1dd852f6f
[Bug 24848] Use range metadata to constant fold comparisons between two values

Summary:
This is the second part of fixing bug 24848 https://llvm.org/bugs/show_bug.cgi?id=24848.

If both operands of a comparison have range metadata, they should be used to constant fold the comparison.

Reviewers: sanjoy, hfinkel

Subscribers: llvm-commits

Differential Revision: http://reviews.llvm.org/D13177

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@248650 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Analysis/InstructionSimplify.cpp
test/Transforms/InstCombine/icmp-range.ll