+2019-06-26 Jeff Law <law@redhat.com>
+
+ * tree-ssa-dse.c (initialize_ao_ref_for_dse): Handle _chk variants of
+ memcpy, memmove and memset builtins.
+ (maybe_trim_memstar_call): Likewise.
+
2019-06-26 David Edelsohn <dje.gcc@gmail.com>
* config/rs6000/rs6000-logue.c: Add #ifndef TARGET_PROFILE_KERNEL.
+2019-06-26 Jeff Law <law@redhat.com>
+
+ * gcc.c-torture/execute/builtins/builtins.exp: Add -fno-tree-dse
+ as DSE compromises several of these tests.
+ * gcc.dg/builtin-stringop-chk-1.c: Similarly.
+ * gcc.dg/memcpy-2.c: Similarly.
+ * gcc.dg/pr40340-1.c: Similarly.
+ * gcc.dg/pr40340-2.c: Similarly.
+ * gcc.dg/pr40340-5.c: Similarly.
+
2019-06-26 Steven G. Kargl <kargl@gcc.gnu.org>
PR Fortran/90988
torture-init
set-torture-options $C_TORTURE_OPTIONS {{}} $LTO_TORTURE_OPTIONS
-set additional_flags "-fno-tree-loop-distribute-patterns -fno-tracer"
+set additional_flags "-fno-tree-dse -fno-tree-loop-distribute-patterns -fno-tracer"
if [istarget "powerpc-*-darwin*"] {
lappend additional_flags "-Wl,-multiply_defined,suppress"
}
/* Test whether buffer overflow warnings for __*_chk builtins
are emitted properly. */
/* { dg-do compile } */
-/* { dg-options "-O2 -Wno-format -std=gnu99 -ftrack-macro-expansion=0" } */
+/* { dg-options "-O2 -Wno-format -std=gnu99 -ftrack-macro-expansion=0 -fno-tree-dse" } */
// { dg-skip-if "packed attribute missing for t" { "epiphany-*-*" } }
extern void abort (void);
/* PR middle-end/38454 */
/* { dg-do compile } */
-/* { dg-options "-O2" } */
+/* { dg-options "-O2 -fno-tree-dse" } */
typedef __SIZE_TYPE__ size_t;
/* PR middle-end/40340 */
/* { dg-do compile } */
-/* { dg-options "-O2 -Wall -Wno-system-headers" } */
+/* { dg-options "-O2 -Wall -Wno-system-headers -fno-tree-dse" } */
#include "pr40340.h"
/* PR middle-end/40340 */
/* { dg-do compile } */
-/* { dg-options "-O2 -Wall -Wno-system-headers" } */
+/* { dg-options "-O2 -Wall -Wno-system-headers -fno-tree-dse" } */
#include "pr40340.h"
/* PR middle-end/40340 */
/* { dg-do compile } */
-/* { dg-options "-O2 -Wall -Wsystem-headers -g" } */
+/* { dg-options "-O2 -Wall -Wsystem-headers -g -fno-tree-dse" } */
#define TEST3
#include "pr40340.h"
case BUILT_IN_MEMCPY:
case BUILT_IN_MEMMOVE:
case BUILT_IN_MEMSET:
+ case BUILT_IN_MEMCPY_CHK:
+ case BUILT_IN_MEMMOVE_CHK:
+ case BUILT_IN_MEMSET_CHK:
{
tree size = NULL_TREE;
if (gimple_call_num_args (stmt) == 3)
{
case BUILT_IN_MEMCPY:
case BUILT_IN_MEMMOVE:
+ case BUILT_IN_MEMCPY_CHK:
+ case BUILT_IN_MEMMOVE_CHK:
{
int head_trim, tail_trim;
compute_trims (ref, live, &head_trim, &tail_trim, stmt);
}
case BUILT_IN_MEMSET:
+ case BUILT_IN_MEMSET_CHK:
{
int head_trim, tail_trim;
compute_trims (ref, live, &head_trim, &tail_trim, stmt);
case BUILT_IN_MEMCPY:
case BUILT_IN_MEMMOVE:
case BUILT_IN_MEMSET:
+ case BUILT_IN_MEMCPY_CHK:
+ case BUILT_IN_MEMMOVE_CHK:
+ case BUILT_IN_MEMSET_CHK:
{
/* Occasionally calls with an explicit length of zero
show up in the IL. It's pointless to do analysis