MIPS: Eliminate intentional conversion from Smi to Int32 in HMul
Port r16361 (b41ab14c) Original commit message: If not all uses of arithmetic binary operation can be truncated to Smi, check if they can be truncated to Int32 which could avoid minus zero check Fixed DoMulI on X64 to adopt correct operand size when the representation is Smi Fixed DoMulI on ARM. Constant right operand optimization is based on Integer 32 instead of its representation. BUG= Review URL: https://codereview.chromium.org/23644002 git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@16374 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
This commit is contained in:
parent
03644ab8df
commit
8a277a790e
@ -409,7 +409,7 @@ Register LCodeGen::EmitLoadRegister(LOperand* op, Register scratch) {
|
||||
} else if (r.IsDouble()) {
|
||||
Abort(kEmitLoadRegisterUnsupportedDoubleImmediate);
|
||||
} else {
|
||||
ASSERT(r.IsTagged());
|
||||
ASSERT(r.IsSmiOrTagged());
|
||||
__ LoadObject(scratch, literal);
|
||||
}
|
||||
return scratch;
|
||||
@ -1398,10 +1398,7 @@ void LCodeGen::DoMulI(LMulI* instr) {
|
||||
instr->hydrogen()->CheckFlag(HValue::kBailoutOnMinusZero);
|
||||
|
||||
if (right_op->IsConstantOperand() && !can_overflow) {
|
||||
// Use optimized code for specific constants.
|
||||
int32_t constant = ToRepresentation(
|
||||
LConstantOperand::cast(right_op),
|
||||
instr->hydrogen()->right()->representation());
|
||||
int32_t constant = ToInteger32(LConstantOperand::cast(right_op));
|
||||
|
||||
if (bailout_on_minus_zero && (constant < 0)) {
|
||||
// The case of a null constant will be handled separately.
|
||||
|
Loading…
Reference in New Issue
Block a user