Constant propagation after hiting llvm.assume
authorPiotr Padlewski <prazek@google.com>
Wed, 2 Sep 2015 19:59:53 +0000 (19:59 +0000)
committerPiotr Padlewski <prazek@google.com>
Wed, 2 Sep 2015 19:59:53 +0000 (19:59 +0000)
commit596432ddc95ca1b21e00f362762bc160d9efbb7d
treedee72054c71a57459740b15b6861048ada800eac
parent7c393ccd9736428919f59443e8f5104906a0c8f6
Constant propagation after hiting llvm.assume

After hitting @llvm.assume(X) we can:
- propagate equality that X == true
- if X is icmp/fcmp (with eq operation), and one of operand
  is constant we can change all variables with constants in the same BasicBlock

http://reviews.llvm.org/D11918

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@246695 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Transforms/Scalar/GVN.cpp
test/Transforms/GVN/assume-equal.ll [new file with mode: 0644]