Constant propagation after hiting llvm.assume
authorPiotr Padlewski <prazek@google.com>
Tue, 18 Aug 2015 03:55:30 +0000 (03:55 +0000)
committerPiotr Padlewski <prazek@google.com>
Tue, 18 Aug 2015 03:55:30 +0000 (03:55 +0000)
commit5982c0a7280bbceb38d2cb2f1bdf4e8feb6c98c8
tree4ccd00cf0dc2bcf428895bad045cbcbaf0210c6d
parent8d5e5d4170a18fabef5b87cf7b2230b77ae38a77
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@245265 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Transforms/Scalar/GVN.cpp
test/Transforms/GVN/assume-equal.ll [new file with mode: 0644]