We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 2419957 commit 94be433Copy full SHA for 94be433
chromium/v8/src/compiler/backend/x64/instruction-selector-x64.cc
@@ -1279,7 +1279,9 @@ void InstructionSelector::VisitChangeInt32ToInt64(Node* node) {
1279
opcode = load_rep.IsSigned() ? kX64Movsxwq : kX64Movzxwq;
1280
break;
1281
case MachineRepresentation::kWord32:
1282
- opcode = load_rep.IsSigned() ? kX64Movsxlq : kX64Movl;
+ // ChangeInt32ToInt64 must interpret its input as a _signed_ 32-bit
1283
+ // integer, so here we must sign-extend the loaded value in any case.
1284
+ opcode = kX64Movsxlq;
1285
1286
default:
1287
UNREACHABLE();
0 commit comments