diff options
author | Jakub Jelinek <jakub@redhat.com> | 2017-02-21 17:29:37 +0100 |
---|---|---|
committer | Jakub Jelinek <jakub@gcc.gnu.org> | 2017-02-21 17:29:37 +0100 |
commit | d002d099b0107491a905b6d3e574ed0436fca3a9 (patch) | |
tree | 65d5e1ef559c4263d1cfca25d372616320531a05 /gcc/tree-loop-distribution.c | |
parent | 5daaf2d5d971bdd3db733fc041bdd4bad674c65c (diff) | |
download | gcc-d002d099b0107491a905b6d3e574ed0436fca3a9.zip gcc-d002d099b0107491a905b6d3e574ed0436fca3a9.tar.gz gcc-d002d099b0107491a905b6d3e574ed0436fca3a9.tar.bz2 |
re PR middle-end/79649 (Memset pattern in named address space crashes compiler or generates wrong code)
PR tree-optimization/79649
* tree-loop-distribution.c (classify_partition): Give up on
non-generic address space loads/stores.
* gcc.target/i386/pr79649.c: New test.
From-SVN: r245631
Diffstat (limited to 'gcc/tree-loop-distribution.c')
-rw-r--r-- | gcc/tree-loop-distribution.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/gcc/tree-loop-distribution.c b/gcc/tree-loop-distribution.c index 0fec1d6..4b94d0f 100644 --- a/gcc/tree-loop-distribution.c +++ b/gcc/tree-loop-distribution.c @@ -1072,6 +1072,13 @@ classify_partition (loop_p loop, struct graph *rdg, partition *partition) /* But exactly one store and/or load. */ for (j = 0; RDG_DATAREFS (rdg, i).iterate (j, &dr); ++j) { + tree type = TREE_TYPE (DR_REF (dr)); + + /* The memset, memcpy and memmove library calls are only + able to deal with generic address space. */ + if (!ADDR_SPACE_GENERIC_P (TYPE_ADDR_SPACE (type))) + return; + if (DR_IS_READ (dr)) { if (single_load != NULL) |