Index: src/compiler/code-assembler.cc |
diff --git a/src/compiler/code-assembler.cc b/src/compiler/code-assembler.cc |
index 46208751cd7bbdc2bf5a26833a4d44ecae9abcf5..3ef8243a50865a4fde987a413f306c5452c24665 100644 |
--- a/src/compiler/code-assembler.cc |
+++ b/src/compiler/code-assembler.cc |
@@ -209,11 +209,18 @@ CODE_ASSEMBLER_BINARY_OP_LIST(DEFINE_CODE_ASSEMBLER_BINARY_OP) |
#undef DEFINE_CODE_ASSEMBLER_BINARY_OP |
Node* CodeAssembler::WordShl(Node* value, int shift) { |
- return raw_assembler_->WordShl(value, IntPtrConstant(shift)); |
+ return (shift != 0) ? raw_assembler_->WordShl(value, IntPtrConstant(shift)) |
+ : value; |
} |
Node* CodeAssembler::WordShr(Node* value, int shift) { |
- return raw_assembler_->WordShr(value, IntPtrConstant(shift)); |
+ return (shift != 0) ? raw_assembler_->WordShr(value, IntPtrConstant(shift)) |
+ : value; |
+} |
+ |
+Node* CodeAssembler::Word32Shr(Node* value, int shift) { |
+ return (shift != 0) ? raw_assembler_->Word32Shr(value, IntPtrConstant(shift)) |
+ : value; |
} |
Node* CodeAssembler::ChangeUint32ToWord(Node* value) { |