]> git.ipfire.org Git - thirdparty/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>
Wed, 11 May 2022 06:17:56 +0000 (08:17 +0200)
commit870a9a8e82269a4213660459eabf0744d583e0c3
tree9d757d3934288298069f75e6f142a0fb01d4e030
parent5c742d9a7e217746de961da20a39f04e5ec1df25
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.

(cherry picked from commit f62115c9b770a66c5378f78a2d5866243d560573)
gcc/match.pd
gcc/testsuite/gcc.dg/pr104675-3.c [new file with mode: 0644]