comparison src/share/vm/opto/postaloc.cpp @ 6185:424142833d10

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
author kvn
date Fri, 22 Jun 2012 10:40:48 -0700
parents 8c92982cbbc4
children 2aff40cb4703
comparison
equal deleted inserted replaced
6184:40782a131183 6185:424142833d10
306 } 306 }
307 if (ignore_self) continue; 307 if (ignore_self) continue;
308 } 308 }
309 309
310 Node *vv = value[reg]; 310 Node *vv = value[reg];
311 if (n_regs > 1) { // Doubles check for aligned-adjacent pair 311 if (n_regs > 1) { // Doubles and vectors check for aligned-adjacent set
312 if( (reg&1)==0 ) continue; // Wrong half of a pair 312 uint last = (n_regs-1); // Looking for the last part of a set
313 if( vv != value[reg-1] ) continue; // Not a complete pair 313 if ((reg&last) != last) continue; // Wrong part of a set
314 if (!register_contains_value(vv, reg, n_regs, value)) continue; // Different value
314 } 315 }
315 if( vv == val || // Got a direct hit? 316 if( vv == val || // Got a direct hit?
316 (t && vv && vv->bottom_type() == t && vv->is_Mach() && 317 (t && vv && vv->bottom_type() == t && vv->is_Mach() &&
317 vv->as_Mach()->rule() == val->as_Mach()->rule()) ) { // Or same constant? 318 vv->as_Mach()->rule() == val->as_Mach()->rule()) ) { // Or same constant?
318 assert( !n->is_Phi(), "cannot change registers at a Phi so easily" ); 319 assert( !n->is_Phi(), "cannot change registers at a Phi so easily" );
571 value.map(ureg,valdef); // record improved reaching-def info 572 value.map(ureg,valdef); // record improved reaching-def info
572 regnd.map(ureg, def); 573 regnd.map(ureg, def);
573 // Record other half of doubles 574 // Record other half of doubles
574 uint def_ideal_reg = def->ideal_reg(); 575 uint def_ideal_reg = def->ideal_reg();
575 int n_regs = RegMask::num_registers(def_ideal_reg); 576 int n_regs = RegMask::num_registers(def_ideal_reg);
576 bool is_vec = RegMask::is_vector(def_ideal_reg);
577 for (int l = 1; l < n_regs; l++) { 577 for (int l = 1; l < n_regs; l++) {
578 OptoReg::Name ureg_lo = OptoReg::add(ureg,-l); 578 OptoReg::Name ureg_lo = OptoReg::add(ureg,-l);
579 if (!value[ureg_lo] && 579 if (!value[ureg_lo] &&
580 (!RegMask::can_represent(ureg_lo) || 580 (!RegMask::can_represent(ureg_lo) ||
581 lrgs(useidx).mask().Member(ureg_lo))) { // Nearly always adjacent 581 lrgs(useidx).mask().Member(ureg_lo))) { // Nearly always adjacent