From: Richard Biener Date: Tue, 24 Nov 2015 09:17:40 +0000 (+0000) Subject: re PR middle-end/68221 (libgomp reduction-11/12 failures) X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=8ab1d9d72cf8cb59186d8af292707eb393e57c3b;p=gcc.git re PR middle-end/68221 (libgomp reduction-11/12 failures) 2015-11-24 Richard Biener PR middle-end/68221 * tree-ssa-sccvn.c (copy_reference_ops_from_ref): Properly use mem_ref_offset. From-SVN: r230793 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index b3538c48735..b8e7129893b 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2015-11-24 Richard Biener + + PR middle-end/68221 + * tree-ssa-sccvn.c (copy_reference_ops_from_ref): Properly + use mem_ref_offset. + 2015-11-24 Segher Boessenkool PR rtl-optimization/68381 diff --git a/gcc/tree-ssa-sccvn.c b/gcc/tree-ssa-sccvn.c index 9a55b5b5161..0c7fd725255 100644 --- a/gcc/tree-ssa-sccvn.c +++ b/gcc/tree-ssa-sccvn.c @@ -750,8 +750,11 @@ copy_reference_ops_from_ref (tree ref, vec *result) case MEM_REF: /* The base address gets its own vn_reference_op_s structure. */ temp.op0 = TREE_OPERAND (ref, 1); - if (tree_fits_shwi_p (TREE_OPERAND (ref, 1))) - temp.off = tree_to_shwi (TREE_OPERAND (ref, 1)); + { + offset_int off = mem_ref_offset (ref); + if (wi::fits_shwi_p (off)) + temp.off = off.to_shwi (); + } temp.clique = MR_DEPENDENCE_CLIQUE (ref); temp.base = MR_DEPENDENCE_BASE (ref); temp.reverse = REF_REVERSE_STORAGE_ORDER (ref);