Make sure HMathMinMax always has a supported representation

Review URL: https://codereview.chromium.org/11467021

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@13180 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
parent 64fc1f99
......@@ -1689,6 +1689,14 @@ void HBinaryOperation::AssumeRepresentation(Representation r) {
}
void HMathMinMax::InferRepresentation(HInferRepresentation* h_infer) {
ASSERT(CheckFlag(kFlexibleRepresentation));
Representation new_rep = RepresentationFromInputs();
UpdateRepresentation(new_rep, h_infer, "inputs");
// Do not care about uses.
}
Range* HBitwise::InferRange(Zone* zone) {
if (op() == Token::BIT_XOR) return HValue::InferRange(zone);
const int32_t kDefaultMask = static_cast<int32_t>(0xffffffff);
......
......@@ -3726,6 +3726,8 @@ class HMathMinMax: public HArithmeticBinaryOperation {
return RequiredInputRepresentation(index);
}
virtual void InferRepresentation(HInferRepresentation* h_infer);
virtual Representation RepresentationFromInputs() {
Representation left_rep = left()->representation();
Representation right_rep = right()->representation();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment