Commit b38f4c1b by Richard Biener Committed by Richard Biener

tree-ssa-sccvn.c (vn_reference_lookup_3): Encode valueized RHS.

2019-06-27  Richard Biener  <rguenther@suse.de>

	* tree-ssa-sccvn.c (vn_reference_lookup_3): Encode valueized RHS.

	* gcc.dg/tree-ssa/ssa-fre-69.c: New testcase.

From-SVN: r272742
parent 5fd336bb
2019-06-27 Richard Biener <rguenther@suse.de>
* tree-ssa-sccvn.c (vn_reference_lookup_3): Encode valueized RHS.
2019-06-27 Jun Ma <JunMa@linux.alibaba.com>
PR tree-optimization/89772
......
2019-06-27 Richard Biener <rguenther@suse.de>
* gcc.dg/tree-ssa/ssa-fre-69.c: New testcase.
2019-06-27 Jun Ma <JunMa@linux.alibaba.com>
PR tree-optimization/89772
......
/* { dg-do compile } */
/* { dg-options "-fgimple -O1 -fdump-tree-fre1" } */
int a[10];
typedef int v2si __attribute__((vector_size(__SIZEOF_INT__*2)));
int __GIMPLE (ssa,guessed_local(97603132),startwith("fre1"))
foo ()
{
int i;
int _59;
int _44;
int _13;
int _18;
v2si _80;
v2si _81;
int res;
__BB(2,guessed_local(97603132)):
_59 = 64;
i_61 = 9;
_44 = i_61 * i_61;
_80 = _Literal (v2si) {_59, _44};
_81 = _80;
__MEM <v2si> ((int *)&a + _Literal (int *) 32) = _81;
i_48 = 9;
_13 = a[8];
_18 = a[i_48];
res_15 = _13 + _18;
return res_15;
}
/* { dg-final { scan-tree-dump "return 145;" "fre1" } } */
......@@ -2242,7 +2242,7 @@ vn_reference_lookup_3 (ao_ref *ref, tree vuse, void *vr_,
tree rhs = gimple_assign_rhs1 (def_stmt);
if (TREE_CODE (rhs) == SSA_NAME)
rhs = SSA_VAL (rhs);
len = native_encode_expr (gimple_assign_rhs1 (def_stmt),
len = native_encode_expr (rhs,
buffer, sizeof (buffer),
(offseti - offset2) / BITS_PER_UNIT);
if (len > 0 && len * BITS_PER_UNIT >= maxsizei)
......
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