Commit 3f9e08f5 by Richard Biener Committed by Richard Biener

tree-ssa-sccvn.c (vn_reference_lookup_3): Valueize MEM_REF base.

2019-09-24  Richard Biener  <rguenther@suse.de>

	* tree-ssa-sccvn.c (vn_reference_lookup_3): Valueize MEM_REF
	base.

	* gcc.dg/torture/20190924-1.c: New testcase.

From-SVN: r276092
parent 47d17f70
2019-09-24 Richard Biener <rguenther@suse.de>
* tree-ssa-sccvn.c (vn_reference_lookup_3): Valueize MEM_REF
base.
2019-09-23 Kyrylo Tkachov <kyrylo.tkachov@arm.com> 2019-09-23 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
* config/arm/t-arm (arm-builtins.o): Add dependency on * config/arm/t-arm (arm-builtins.o): Add dependency on
......
2019-09-24 Richard Biener <rguenther@suse.de>
* gcc.dg/torture/20190924-1.c: New testcase.
2019-09-23 Maciej W. Rozycki <macro@wdc.com> 2019-09-23 Maciej W. Rozycki <macro@wdc.com>
* lib/gnat.exp (gnat_target_compile): Pass the `ada' option to * lib/gnat.exp (gnat_target_compile): Pass the `ada' option to
......
/* { dg-do compile } */
struct acct_gather_energy {
int base_consumed_energy;
int consumed_energy;
int previous_consumed_energy;
};
static struct acct_gather_energy xcc_energy;
struct acct_gather_energy *new;
int _get_joules_task(int first)
{
if (!first && new->previous_consumed_energy)
first = 1;
new->base_consumed_energy = new->consumed_energy;
__builtin_memcpy(&xcc_energy, new, sizeof(struct acct_gather_energy));
return xcc_energy.base_consumed_energy;
}
...@@ -2935,8 +2935,9 @@ vn_reference_lookup_3 (ao_ref *ref, tree vuse, void *data_, ...@@ -2935,8 +2935,9 @@ vn_reference_lookup_3 (ao_ref *ref, tree vuse, void *data_,
else else
return (void *)-1; return (void *)-1;
} }
if (TREE_CODE (rhs) != SSA_NAME if (TREE_CODE (rhs) == SSA_NAME)
&& TREE_CODE (rhs) != ADDR_EXPR) rhs = SSA_VAL (rhs);
else if (TREE_CODE (rhs) != ADDR_EXPR)
return (void *)-1; return (void *)-1;
/* The bases of the destination and the references have to agree. */ /* The bases of the destination and the references have to agree. */
......
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