]> gcc.gnu.org Git - gcc.git/commit
ldist: Further fixes for -ftrapv [PR94114]
authorJakub Jelinek <jakub@redhat.com>
Wed, 11 Mar 2020 08:32:22 +0000 (09:32 +0100)
committerJakub Jelinek <jakub@redhat.com>
Thu, 17 Sep 2020 14:20:25 +0000 (16:20 +0200)
commit8d5332862e86edb92f27bd136ccd9fdba3524039
tree8298a461faa0a03e51f74a1ee3dd4bf3440ec0f0
parentc035257d1f775f44359fe55ceb3d018a68d87114
ldist: Further fixes for -ftrapv [PR94114]

As the testcase shows, arithmetics that for -ftrapv would need multiple
basic blocks can show up not just in nb_bytes expressions where we
are calling rewrite_to_non_trapping_overflow for a while already,
but also in the pointer expression to the start of the region.
While the testcase covers just the first hunk and I've failed to create
a testcase for the latter, it is at least in theory possible too, so I've
adjusted that hunk too.

2020-03-11  Jakub Jelinek  <jakub@redhat.com>

PR tree-optimization/94114
* tree-loop-distribution.c (generate_memset_builtin): Call
rewrite_to_non_trapping_overflow even on mem.
(generate_memcpy_builtin): Call rewrite_to_non_trapping_overflow even
on dest and src.

* gcc.dg/pr94114.c: New test.

(cherry picked from commit 2fd27691f213f2e808626c4cd492b00c801a00fa)
gcc/testsuite/gcc.dg/pr94114.c [new file with mode: 0644]
gcc/tree-loop-distribution.c
This page took 0.067575 seconds and 6 git commands to generate.