[Bug 24848] Use range metadata to constant fold comparisons with constant values
authorChen Li <meloli87@gmail.com>
Wed, 23 Sep 2015 17:58:44 +0000 (17:58 +0000)
committerChen Li <meloli87@gmail.com>
Wed, 23 Sep 2015 17:58:44 +0000 (17:58 +0000)
commitadbf50556dcbe6b196c731a6f71e13aced500408
tree39bf4420f05f206617eb3684431fc237f62c9ea3
parent46a7838d96ae63eab405eeff626c21c9fd53e752
[Bug 24848] Use range metadata to constant fold comparisons with constant values

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

When range metadata is provided, it should be used to constant fold comparisons with constant values.

Reviewers: sanjoy, hfinkel

Subscribers: llvm-commits

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

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