Index: src/hydrogen-instructions.cc |
diff --git a/src/hydrogen-instructions.cc b/src/hydrogen-instructions.cc |
index 67ee5bd3868c900f2eb94c87844657e85b7ccbc1..e989cc682309926c41248c477c70ce173e9fe42f 100644 |
--- a/src/hydrogen-instructions.cc |
+++ b/src/hydrogen-instructions.cc |
@@ -875,12 +875,14 @@ HValue* HBitwise::Canonicalize() { |
int32_t nop_constant = (op() == Token::BIT_AND) ? -1 : 0; |
if (left()->IsConstant() && |
HConstant::cast(left())->HasInteger32Value() && |
- HConstant::cast(left())->Integer32Value() == nop_constant) { |
+ HConstant::cast(left())->Integer32Value() == nop_constant && |
+ !right()->CheckFlag(kUint32)) { |
return right(); |
} |
if (right()->IsConstant() && |
HConstant::cast(right())->HasInteger32Value() && |
- HConstant::cast(right())->Integer32Value() == nop_constant) { |
+ HConstant::cast(right())->Integer32Value() == nop_constant && |
+ !left()->CheckFlag(kUint32)) { |
return left(); |
} |
return this; |
@@ -892,7 +894,9 @@ HValue* HBitNot::Canonicalize() { |
if (value()->IsBitNot()) { |
HValue* result = HBitNot::cast(value())->value(); |
ASSERT(result->representation().IsInteger32()); |
- return result; |
+ if (!result->CheckFlag(kUint32)) { |
+ return result; |
+ } |
} |
return this; |
} |