]> git.ipfire.org Git - thirdparty/gcc.git/commit
gimple-fold: Use bitwise vector types rather than barely supported huge integral...
authorJakub Jelinek <jakub@redhat.com>
Wed, 28 Feb 2024 08:40:15 +0000 (09:40 +0100)
committerJakub Jelinek <jakub@redhat.com>
Wed, 28 Feb 2024 08:40:15 +0000 (09:40 +0100)
commitcc383e9702897dd783657ea3dce4aecf48318441
treee866e45569c12990a6a21f8f3ffe6869bd53055a
parentdc30e24b76d570e13a71567a38f7594b104736bf
gimple-fold: Use bitwise vector types rather than barely supported huge integral types in memcpy etc. folding [PR113988]

The following patch changes the memcpy etc. folding to use bitwise vector
types rather  than huge INTEGER_TYPEs for copying of > MAX_FIXED_MODE_SIZE
lengths.  The problem with the huge INTEGER_TYPEs is that they aren't
supported very much, usually there are just optabs to handle moves of them,
perhaps misaligned moves and that is it, so they pose problems e.g. to
BITINT_TYPE lowering.

2024-02-28  Jakub Jelinek  <jakub@redhat.com>

PR tree-optimization/113988
* stor-layout.h (bitwise_mode_for_size): Declare.
* stor-layout.cc (bitwise_mode_for_size): New function.
* gimple-fold.cc (gimple_fold_builtin_memory_op): Use it.
Use bitwise_type_for_mode instead of build_nonstandard_integer_type.
Use BITS_PER_UNIT instead of 8.

* gcc.dg/bitint-91.c: New test.
gcc/gimple-fold.cc
gcc/stor-layout.cc
gcc/stor-layout.h
gcc/testsuite/gcc.dg/bitint-91.c [new file with mode: 0644]