re PR middle-end/91680 (Integer promotion quirk prevents efficient power of 2 division)
authorJakub Jelinek <jakub@gcc.gnu.org>
Tue, 10 Sep 2019 08:15:46 +0000 (10:15 +0200)
committerJakub Jelinek <jakub@gcc.gnu.org>
Tue, 10 Sep 2019 08:15:46 +0000 (10:15 +0200)
commit873140e65d4332557301db341eb40ed285e34c6d
treef1e61e58fa3672f7730ad80754c8307dfab8b3df
parent6508fa9c067d1d20a32703516ad774e3f6f90f0c
re PR middle-end/91680 (Integer promotion quirk prevents efficient power of 2 division)

PR middle-end/91680
* match.pd ((A / (1 << B)) -> (A >> B)): Allow widening cast from
the shift type to type.

* gcc.dg/tree-ssa/pr91680.c: New test.
* g++.dg/torture/pr91680.C: New test.

From-SVN: r275587
gcc/ChangeLog
gcc/match.pd
gcc/testsuite/ChangeLog
gcc/testsuite/g++.dg/torture/pr91680.C [new file with mode: 0644]
gcc/testsuite/gcc.dg/tree-ssa/pr91680.c [new file with mode: 0644]