Hi,
The following code can be optimized to use memcpy(3), since the length
of the copy is known (we've just called strnlen(3), and discarded the
possibility of truncated lengths).
$ cat strxcpy.c
#include
#include
#include
ssize_t
strxcpy(char *restrict dst, const char *restrict src, size_t d
Snapshot gcc-14-20231112 is now available on
https://gcc.gnu.org/pub/gcc/snapshots/14-20231112/
and on various mirrors, see http://gcc.gnu.org/mirrors.html for details.
This snapshot has been generated from the GCC 14 git branch
with the following options: git://gcc.gnu.org/git/gcc.git branch
On Sun, Nov 12, 2023 at 10:10 PM Alejandro Colomar via Gcc
wrote:
>
> Hi,
>
> The following code can be optimized to use memcpy(3), since the length
> of the copy is known (we've just called strnlen(3), and discarded the
> possibility of truncated lengths).
>
> $ cat strxcpy.c
> #include
> #inclu
Hi, I've been working on vectorization-related optimization lately.
GCC seems to have some optimization vulnerabilities. I would like to
ask if it can be solved.
For example, for the following program using AVX2:
#include
// reg->node2[i].state is an unsigned long long variable
// reg->size is a