Skip to content

Commit bdf31d5

Browse files
nico-hartmannV8 LUCI CQ
authored andcommitted
[TurboFan] Do not use NumberConstant as immediate in x86
Bug: chromium:1254189 Change-Id: I77854c767cf5c5748999fdd40a4a42e25dff3f79 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3236989 Reviewed-by: Maya Lekova <[email protected]> Reviewed-by: Victor Gomes <[email protected]> Commit-Queue: Victor Gomes <[email protected]> Commit-Queue: Nico Hartmann <[email protected]> Cr-Commit-Position: refs/heads/main@{#77516}
1 parent 520dc0d commit bdf31d5

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)