]> gcc.gnu.org Git - gcc.git/commit
bswap: Handle bswapping of pointers [PR96573]
authorJakub Jelinek <jakub@redhat.com>
Thu, 1 Apr 2021 08:51:03 +0000 (10:51 +0200)
committerJakub Jelinek <jakub@redhat.com>
Thu, 1 Apr 2021 08:51:03 +0000 (10:51 +0200)
commit5b9a65ecbeb22ef6dd3344baae97f85b645522e3
tree41a6cb28406c7a1dc4403fad2d220cbf187e2485
parentb75c4e1384c021ca94fc8e8db8e517e802b820f3
bswap: Handle bswapping of pointers [PR96573]

In GCC8/9 we used to optimize this into a bswap, but we no longer do.
Handling byteswapping of pointers is easy, all we need is to allow them,
for the __builtin_bswap* we already use TYPE_PRECISION to determine
the precision and we cast the operand and result to the correct type
if they aren't uselessly convertible to what the builtin expects.

2021-04-01  Jakub Jelinek  <jakub@redhat.com>

PR tree-optimization/96573
* gimple-ssa-store-merging.c (init_symbolic_number): Handle
also pointer types.

* gcc.dg/pr96573.c: New test.
gcc/gimple-ssa-store-merging.c
gcc/testsuite/gcc.dg/pr96573.c [new file with mode: 0644]
This page took 0.068618 seconds and 6 git commands to generate.