diff options
author | Richard Biener <rguenther@suse.de> | 2017-02-17 10:43:27 +0000 |
---|---|---|
committer | Richard Biener <rguenth@gcc.gnu.org> | 2017-02-17 10:43:27 +0000 |
commit | 1dc5814cc55f11a4256d3c41563fb7cde31d060b (patch) | |
tree | a595de7bdf9a7168efb226461017d2ff5f7de94c /gcc/tree-ssa-structalias.c | |
parent | c265c2dd6f4f18d94d001b68faee1ac7ee1280cb (diff) | |
download | gcc-1dc5814cc55f11a4256d3c41563fb7cde31d060b.zip gcc-1dc5814cc55f11a4256d3c41563fb7cde31d060b.tar.gz gcc-1dc5814cc55f11a4256d3c41563fb7cde31d060b.tar.bz2 |
re PR inline-asm/79552 (Wrong code generation due to -fschedule-insns, with __restrict__ and inline asm)
2017-02-17 Richard Biener <rguenther@suse.de>
PR tree-optimization/79552
* tree-ssa-structalias.c (visit_loadstore): Properly verify
default defs.
From-SVN: r245528
Diffstat (limited to 'gcc/tree-ssa-structalias.c')
-rw-r--r-- | gcc/tree-ssa-structalias.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/gcc/tree-ssa-structalias.c b/gcc/tree-ssa-structalias.c index 390d5bb..c043e5e 100644 --- a/gcc/tree-ssa-structalias.c +++ b/gcc/tree-ssa-structalias.c @@ -7296,9 +7296,15 @@ visit_loadstore (gimple *, tree base, tree ref, void *data) || TREE_CODE (base) == TARGET_MEM_REF) { tree ptr = TREE_OPERAND (base, 0); - if (TREE_CODE (ptr) == SSA_NAME - && ! SSA_NAME_IS_DEFAULT_DEF (ptr)) + if (TREE_CODE (ptr) == SSA_NAME) { + /* For parameters, get at the points-to set for the actual parm + decl. */ + if (SSA_NAME_IS_DEFAULT_DEF (ptr) + && (TREE_CODE (SSA_NAME_VAR (ptr)) == PARM_DECL + || TREE_CODE (SSA_NAME_VAR (ptr)) == RESULT_DECL)) + ptr = SSA_NAME_VAR (ptr); + /* We need to make sure 'ptr' doesn't include any of the restrict tags we added bases for in its points-to set. */ varinfo_t vi = lookup_vi_for_tree (ptr); |