InstCombine: merge constants in both operands of icmp.
authorErik Verbruggen <erikjv@me.com>
Thu, 27 Mar 2014 11:16:05 +0000 (11:16 +0000)
committerErik Verbruggen <erikjv@me.com>
Thu, 27 Mar 2014 11:16:05 +0000 (11:16 +0000)
commit668c2aa51740da56f26a7488348362916fc77b2c
tree3e2d62ac54468fc0bb064a17451ea2d84ae5490b
parent5fa6dffd30c24f82a615cf7d2e17252974c4b4eb
InstCombine: merge constants in both operands of icmp.

Transform:
    icmp X+Cst2, Cst
into:
    icmp X, Cst-Cst2
when Cst-Cst2 does not overflow, and the add has nsw.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@204912 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Target/README.txt
lib/Transforms/InstCombine/InstCombineCompares.cpp
test/Transforms/InstCombine/icmp.ll