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

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

Issue 824843002: [turbofan] Fix missing ChangeUint32ToUint64 in lowering of LoadBuffer. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 6 years 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 | test/mjsunit/compiler/regress-444695.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/compiler/simplified-lowering.cc
diff --git a/src/compiler/simplified-lowering.cc b/src/compiler/simplified-lowering.cc
index c4b1b57d1fb0804ce16e50cb69856ced06e3f6e8..74ddb53dd1d9142aa8463858aeadcd21b02afe6c 100644
--- a/src/compiler/simplified-lowering.cc
+++ b/src/compiler/simplified-lowering.cc
@@ -1147,14 +1147,18 @@ void SimplifiedLowering::DoLoadBuffer(Node* node, MachineType output_type,
Node* const length = node->InputAt(2);
Node* const effect = node->InputAt(3);
Node* const control = node->InputAt(4);
+ Node* const index =
+ machine()->Is64()
+ ? graph()->NewNode(machine()->ChangeUint32ToUint64(), offset)
+ : offset;
Node* check = graph()->NewNode(machine()->Uint32LessThan(), offset, length);
Node* branch =
graph()->NewNode(common()->Branch(BranchHint::kTrue), check, control);
Node* if_true = graph()->NewNode(common()->IfTrue(), branch);
- Node* etrue = graph()->NewNode(machine()->Load(type), buffer, offset,
- effect, if_true);
+ Node* etrue =
+ graph()->NewNode(machine()->Load(type), buffer, index, effect, if_true);
Node* vtrue = changer->GetRepresentationFor(etrue, type, output_type);
Node* if_false = graph()->NewNode(common()->IfFalse(), branch);
« no previous file with comments | « no previous file | test/mjsunit/compiler/regress-444695.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698