re PR tree-optimization/61839 (More optimize opportunity for VRP)
authorKugan Vivekanandarajah <kuganv@linaro.org>
Sat, 20 Aug 2016 01:18:09 +0000 (01:18 +0000)
committerKugan Vivekanandarajah <kugan@gcc.gnu.org>
Sat, 20 Aug 2016 01:18:09 +0000 (01:18 +0000)
commit22d12455eaf2e4c64ef8c778358087d999d2ccd8
tree59b27eaa3e0d776ac20ff1224817253d94a968b0
parent151d752b9eedbe2648cf02c4f330adeabf22237d
re PR tree-optimization/61839 (More optimize opportunity for VRP)

gcc/testsuite/ChangeLog:

2016-08-20  Kugan Vivekanandarajah  <kuganv@linaro.org>

PR tree-optimization/61839
* gcc.dg/tree-ssa/pr61839_1.c: New test.
* gcc.dg/tree-ssa/pr61839_2.c: New test.
* gcc.dg/tree-ssa/pr61839_3.c: New test.
* gcc.dg/tree-ssa/pr61839_4.c: New test.

gcc/ChangeLog:

2016-08-20  Kugan Vivekanandarajah  <kuganv@linaro.org>

PR tree-optimization/61839
* tree-vrp.c (two_valued_val_range_p): New.
(simplify_stmt_using_ranges): Convert CST BINOP VAR where VAR is
two-valued to VAR == VAL1 ? (CST BINOP VAL1) : (CST BINOP VAL2).
Also Convert VAR BINOP CST where VAR is two-valued to
VAR == VAL1 ? (VAL1 BINOP CST) : (VAL2 BINOP CST).

From-SVN: r239637
gcc/ChangeLog
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.dg/tree-ssa/pr61839_1.c [new file with mode: 0644]
gcc/testsuite/gcc.dg/tree-ssa/pr61839_2.c [new file with mode: 0644]
gcc/testsuite/gcc.dg/tree-ssa/pr61839_3.c [new file with mode: 0644]
gcc/testsuite/gcc.dg/tree-ssa/pr61839_4.c [new file with mode: 0644]
gcc/tree-vrp.c