Commit c61abc14 authored by Benedikt Meurer's avatar Benedikt Meurer

[turbofan] Materialize the correct kind of constant for bit 1.

Bit 1 should be represented as Int32Constant 1 after simplified
lowering, but OneConstant returns NumberConstant 1.0.

R=jochen@chromium.org, hpayer@chromium.org

Review URL: https://codereview.chromium.org/820993002

Cr-Commit-Position: refs/heads/master@{#25919}
parent 64e1b561
......@@ -294,7 +294,7 @@ class RepresentationChanger {
case IrOpcode::kInt32Constant: {
int32_t value = OpParameter<int32_t>(node);
if (value == 0 || value == 1) return node;
return jsgraph()->OneConstant(); // value != 0
return jsgraph()->Int32Constant(1); // value != 0
}
case IrOpcode::kHeapConstant: {
Handle<Object> handle = OpParameter<Unique<Object> >(node).handle();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment