Commit aee63acc by Richard Biener Committed by Richard Biener

re PR tree-optimization/80591 (AArch64 kernel miscompilation starting with r246809)

2017-05-02  Richard Biener  <rguenther@suse.de>

	PR tree-optimization/80591
	Revert
	2017-04-10  Richard Biener  <rguenther@suse.de>

	* tree-ssa-structalias.c (find_func_aliases): Properly handle
	asm inputs.

	* gcc.dg/torture/pr80591.c: New testcase.

From-SVN: r247488
parent e7d70c6c
2017-05-02 Richard Biener <rguenther@suse.de> 2017-05-02 Richard Biener <rguenther@suse.de>
PR tree-optimization/80591
Revert
2017-04-10 Richard Biener <rguenther@suse.de>
* tree-ssa-structalias.c (find_func_aliases): Properly handle
asm inputs.
2017-05-02 Richard Biener <rguenther@suse.de>
PR tree-optimization/80549 PR tree-optimization/80549
* tree-cfgcleanup.c (mfb_keep_latches): New helper. * tree-cfgcleanup.c (mfb_keep_latches): New helper.
(cleanup_tree_cfg_noloop): Create forwarders to known loop (cleanup_tree_cfg_noloop): Create forwarders to known loop
......
2017-05-02 Richard Biener <rguenther@suse.de> 2017-05-02 Richard Biener <rguenther@suse.de>
PR tree-optimization/80591
* gcc.dg/torture/pr80591.c: New testcase.
2017-05-02 Richard Biener <rguenther@suse.de>
PR tree-optimization/80549 PR tree-optimization/80549
* gcc.dg/torture/pr80549.c: New testcase. * gcc.dg/torture/pr80549.c: New testcase.
......
/* PR tree-optimization/80591 */
/* { dg-do compile } */
/* { dg-skip-if "" { *-*-* } "-flto" } */
/* { dg-additional-options "-fdump-tree-optimized" } */
static inline __attribute__((always_inline)) int *
foo (void)
{
__UINTPTR_TYPE__ sp;
asm ("" : "=r" (sp));
return (int *) sp;
}
void
bar (void)
{
foo ()[0] += 26;
}
/* { dg-final { scan-tree-dump "\\+ 26;" "optimized" } } */
...@@ -4978,14 +4978,14 @@ find_func_aliases (struct function *fn, gimple *origt) ...@@ -4978,14 +4978,14 @@ find_func_aliases (struct function *fn, gimple *origt)
make_escape_constraint (build_fold_addr_expr (op)); make_escape_constraint (build_fold_addr_expr (op));
/* The asm may read global memory, so outputs may point to /* The asm may read global memory, so outputs may point to
any global or escaped memory. */ any global memory. */
if (op) if (op)
{ {
auto_vec<ce_s, 2> lhsc; auto_vec<ce_s, 2> lhsc;
struct constraint_expr rhsc, *lhsp; struct constraint_expr rhsc, *lhsp;
unsigned j; unsigned j;
get_constraint_for (op, &lhsc); get_constraint_for (op, &lhsc);
rhsc.var = escaped_id; rhsc.var = nonlocal_id;
rhsc.offset = 0; rhsc.offset = 0;
rhsc.type = SCALAR; rhsc.type = SCALAR;
FOR_EACH_VEC_ELT (lhsc, j, lhsp) FOR_EACH_VEC_ELT (lhsc, j, lhsp)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment