Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(84)

Unified Diff: src/compiler/int64-lowering.cc

Issue 1776613002: [wasm] Int64Lowering of I64XConvertI32. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Rebase Created 4 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | src/compiler/wasm-compiler.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/compiler/int64-lowering.cc
diff --git a/src/compiler/int64-lowering.cc b/src/compiler/int64-lowering.cc
index 23774a670bafd8d77215cd800c5e7858d6169c66..7b0fa9e27fdf5cfdbe885454ddaee7c6bde54a5a 100644
--- a/src/compiler/int64-lowering.cc
+++ b/src/compiler/int64-lowering.cc
@@ -356,8 +356,31 @@ void Int64Lowering::LowerNode(Node* node) {
}
// kExprI64SConvertI32:
- // kExprI64UConvertI32:
-
+ case IrOpcode::kChangeInt32ToInt64: {
+ DCHECK(node->InputCount() == 1);
+ Node* input = node->InputAt(0);
+ if (HasReplacementLow(input)) {
+ input = GetReplacementLow(input);
+ }
+ // We use SAR to preserve the sign in the high word.
+ ReplaceNode(
+ node, input,
+ graph()->NewNode(machine()->Word32Sar(), input,
+ graph()->NewNode(common()->Int32Constant(31))));
+ node->NullAllInputs();
+ break;
+ }
+ // kExprI64UConvertI32: {
+ case IrOpcode::kChangeUint32ToUint64: {
+ DCHECK(node->InputCount() == 1);
+ Node* input = node->InputAt(0);
+ if (HasReplacementLow(input)) {
+ input = GetReplacementLow(input);
+ }
+ ReplaceNode(node, input, graph()->NewNode(common()->Int32Constant(0)));
+ node->NullAllInputs();
+ break;
+ }
// kExprF64ReinterpretI64:
// kExprI64ReinterpretF64:
« no previous file with comments | « no previous file | src/compiler/wasm-compiler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698