# HG changeset patch # User kvn # Date 1340386848 25200 # Node ID 424142833d1048b01e4fb5e4d2099134d6b48ed4 # Parent 40782a131183d37694ac0fbfba4e08bfa770eff5 7178280: Failed new vector regression tests Summary: When looking for the same value in an other register check that all parts of that register has the same value. Reviewed-by: johnc, twisti diff -r 40782a131183 -r 424142833d10 src/share/vm/opto/postaloc.cpp --- a/src/share/vm/opto/postaloc.cpp Thu Jun 21 09:52:38 2012 +0200 +++ b/src/share/vm/opto/postaloc.cpp Fri Jun 22 10:40:48 2012 -0700 @@ -308,9 +308,10 @@ } Node *vv = value[reg]; - if (n_regs > 1) { // Doubles check for aligned-adjacent pair - if( (reg&1)==0 ) continue; // Wrong half of a pair - if( vv != value[reg-1] ) continue; // Not a complete pair + if (n_regs > 1) { // Doubles and vectors check for aligned-adjacent set + uint last = (n_regs-1); // Looking for the last part of a set + if ((reg&last) != last) continue; // Wrong part of a set + if (!register_contains_value(vv, reg, n_regs, value)) continue; // Different value } if( vv == val || // Got a direct hit? (t && vv && vv->bottom_type() == t && vv->is_Mach() && @@ -573,7 +574,6 @@ // Record other half of doubles uint def_ideal_reg = def->ideal_reg(); int n_regs = RegMask::num_registers(def_ideal_reg); - bool is_vec = RegMask::is_vector(def_ideal_reg); for (int l = 1; l < n_regs; l++) { OptoReg::Name ureg_lo = OptoReg::add(ureg,-l); if (!value[ureg_lo] &&