Skip to content

Commit 5d2b5e7

Browse files
nico-hartmannV8 LUCI CQ
authored andcommitted
Merged: [TurboFan] Do not use NumberConstant as immediate in x86
Bug: chromium:1254189 (cherry picked from commit bdf31d5) Change-Id: I1d4426fee8392c7a680ad67af4bf2745d04b2e52 No-Try: true No-Presubmit: true No-Tree-Checks: true Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3268905 Commit-Queue: Nico Hartmann <[email protected]> Reviewed-by: Maya Lekova <[email protected]> Cr-Commit-Position: refs/branch-heads/9.6@{#22} Cr-Branched-From: 0b7bda0-refs/heads/9.6.180@{#1} Cr-Branched-From: 41a5a24-refs/heads/main@{#77244}
1 parent 5c62f97 commit 5d2b5e7

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

src/compiler/backend/ia32/instruction-selector-ia32.cc

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,11 +99,14 @@ class IA32OperandGenerator final : public OperandGenerator {
9999
bool CanBeImmediate(Node* node) {
100100
switch (node->opcode()) {
101101
case IrOpcode::kInt32Constant:
102-
case IrOpcode::kNumberConstant:
103102
case IrOpcode::kExternalConstant:
104103
case IrOpcode::kRelocatableInt32Constant:
105104
case IrOpcode::kRelocatableInt64Constant:
106105
return true;
106+
case IrOpcode::kNumberConstant: {
107+
const double value = OpParameter<double>(node->op());
108+
return bit_cast<int64_t>(value) == 0;
109+
}
107110
case IrOpcode::kHeapConstant: {
108111
// TODO(bmeurer): We must not dereference handles concurrently. If we
109112
// really have to this here, then we need to find a way to put this

0 commit comments

Comments
 (0)