]> gcc.gnu.org Git - gcc.git/commit
match.pd: Further complex simplification fixes [PR104675]
authorJakub Jelinek <jakub@redhat.com>
Fri, 25 Feb 2022 20:25:12 +0000 (21:25 +0100)
committerJakub Jelinek <jakub@redhat.com>
Fri, 25 Feb 2022 20:25:12 +0000 (21:25 +0100)
commitf62115c9b770a66c5378f78a2d5866243d560573
tree4f146144ce3374279e18a7cd84442201fb71c3d0
parent3885a122f817a1b6dca4a84ba9e020d5ab2060af
match.pd: Further complex simplification fixes [PR104675]

Mark mentioned in the PR further 2 simplifications that also ICE
with complex types.
For these, eventually (but IMO GCC 13 materials) we could support it
for vector types if it would be uniform vector constants.
Currently integer_pow2p is true only for INTEGER_CSTs and COMPLEX_CSTs
and we can't use bit_and etc. for complex type.

2022-02-25  Jakub Jelinek  <jakub@redhat.com>
    Marc Glisse  <marc.glisse@inria.fr>

PR tree-optimization/104675
* match.pd (t * 2U / 2 -> t & (~0 / 2), t / 2U * 2 -> t & ~1):
Restrict simplifications to INTEGRAL_TYPE_P.

* gcc.dg/pr104675-3.c : New test.
gcc/match.pd
gcc/testsuite/gcc.dg/pr104675-3.c [new file with mode: 0644]
This page took 0.064699 seconds and 6 git commands to generate.