[simplify-rtx] (GTU (PLUS a C) (C - 1)) --> (LTU a -C)
authorKyrylo Tkachov <kyrylo.tkachov@arm.com>
Mon, 19 Sep 2016 16:15:57 +0000 (16:15 +0000)
committerKyrylo Tkachov <ktkachov@gcc.gnu.org>
Mon, 19 Sep 2016 16:15:57 +0000 (16:15 +0000)
commit5fa9e6441ff5169f90d0754b2321d3ddffad89fa
treea7379f1fefea79b97de434568bc40379bfc7ce2f
parentee1ab3e3c2296a7cea60f0b1d92a5b3d9cc4cae3
[simplify-rtx] (GTU (PLUS a C) (C - 1)) --> (LTU a -C)

* simplify-rtx.c (simplify_relational_operation_1): Add transformation
(GTU (PLUS a C) (C - 1)) --> (LTU a -C).

* gcc.target/aarch64/gtu_to_ltu_cmp_1.c: New test.
* gcc.target/aarch64/gtu_to_ltu_cmp_2.c: New test.

From-SVN: r240238
gcc/ChangeLog
gcc/simplify-rtx.c
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.target/aarch64/gtu_to_ltu_cmp_1.c [new file with mode: 0644]
gcc/testsuite/gcc.target/aarch64/gtu_to_ltu_cmp_2.c [new file with mode: 0644]