Index: sdk/lib/_internal/compiler/implementation/ssa/types_propagation.dart |
diff --git a/sdk/lib/_internal/compiler/implementation/ssa/types_propagation.dart b/sdk/lib/_internal/compiler/implementation/ssa/types_propagation.dart |
index 82b32bad82ff791c8b1dc5ca9ff53a4a06368a6e..716fb512ea3cd690b5f7201166d6964f5960d150 100644 |
--- a/sdk/lib/_internal/compiler/implementation/ssa/types_propagation.dart |
+++ b/sdk/lib/_internal/compiler/implementation/ssa/types_propagation.dart |
@@ -126,6 +126,13 @@ class SsaTypePropagator extends HBaseVisitor implements OptimizationPhase { |
} |
TypeMask visitNegate(HNegate instruction) { |
+ HInstruction operand = instruction.operand; |
+ // We have integer subclasses that represent ranges, so widen any int |
+ // subclass to full integer. |
+ if (operand.isInteger(compiler)) { |
+ JavaScriptBackend backend = compiler.backend; |
+ return backend.intType; |
+ } |
return instruction.operand.instructionType; |
} |