comparison src/share/vm/c1/c1_Optimizer.cpp @ 487:80206b8a9128

6758234: if (k cond (a ? : b: c)) returns reversed answer if k is constant and b and c are longs Reviewed-by: kvn, jrose
author never
date Fri, 12 Dec 2008 19:55:26 -0800
parents a61af66fc99e
children 0fbdb4381b99
comparison
equal deleted inserted replaced
486:a738a625039a 487:80206b8a9128
325 Instruction::Condition cond = if_->cond(); 325 Instruction::Condition cond = if_->cond();
326 BlockBegin* tsux = if_->tsux(); 326 BlockBegin* tsux = if_->tsux();
327 BlockBegin* fsux = if_->fsux(); 327 BlockBegin* fsux = if_->fsux();
328 if (swapped) { 328 if (swapped) {
329 cond = Instruction::mirror(cond); 329 cond = Instruction::mirror(cond);
330 tsux = if_->fsux();
331 fsux = if_->tsux();
332 } 330 }
333 331
334 BlockBegin* tblock = tval->compare(cond, con, tsux, fsux); 332 BlockBegin* tblock = tval->compare(cond, con, tsux, fsux);
335 BlockBegin* fblock = fval->compare(cond, con, tsux, fsux); 333 BlockBegin* fblock = fval->compare(cond, con, tsux, fsux);
336 if (tblock != fblock && !if_->is_safepoint()) { 334 if (tblock != fblock && !if_->is_safepoint()) {