1 |
diff --git a/src/share/vm/opto/type.cpp b/src/share/vm/opto/type.cpp |
2 |
--- jdk8/hotspot/src/share/vm/opto/type.cpp |
3 |
+++ jdk8/hotspot/src/share/vm/opto/type.cpp |
4 |
@@ -1158,11 +1158,11 @@ |
5 |
// Certain normalizations keep us sane when comparing types. |
6 |
// The 'SMALLINT' covers constants and also CC and its relatives. |
7 |
if (lo <= hi) { |
8 |
- if ((juint)(hi - lo) <= SMALLINT) w = Type::WidenMin; |
9 |
- if ((juint)(hi - lo) >= max_juint) w = Type::WidenMax; // TypeInt::INT |
10 |
+ if ((juint)hi - lo <= SMALLINT) w = Type::WidenMin; |
11 |
+ if ((juint)hi - lo >= max_juint) w = Type::WidenMax; // TypeInt::INT |
12 |
} else { |
13 |
- if ((juint)(lo - hi) <= SMALLINT) w = Type::WidenMin; |
14 |
- if ((juint)(lo - hi) >= max_juint) w = Type::WidenMin; // dual TypeInt::INT |
15 |
+ if ((juint)lo - hi <= SMALLINT) w = Type::WidenMin; |
16 |
+ if ((juint)lo - hi >= max_juint) w = Type::WidenMin; // dual TypeInt::INT |
17 |
} |
18 |
return w; |
19 |
} |
20 |
@@ -1416,11 +1416,11 @@ |
21 |
// Certain normalizations keep us sane when comparing types. |
22 |
// The 'SMALLINT' covers constants. |
23 |
if (lo <= hi) { |
24 |
- if ((julong)(hi - lo) <= SMALLINT) w = Type::WidenMin; |
25 |
- if ((julong)(hi - lo) >= max_julong) w = Type::WidenMax; // TypeLong::LONG |
26 |
+ if ((julong)hi - lo <= SMALLINT) w = Type::WidenMin; |
27 |
+ if ((julong)hi - lo >= max_julong) w = Type::WidenMax; // TypeLong::LONG |
28 |
} else { |
29 |
- if ((julong)(lo - hi) <= SMALLINT) w = Type::WidenMin; |
30 |
- if ((julong)(lo - hi) >= max_julong) w = Type::WidenMin; // dual TypeLong::LONG |
31 |
+ if ((julong)lo - hi <= SMALLINT) w = Type::WidenMin; |
32 |
+ if ((julong)lo - hi >= max_julong) w = Type::WidenMin; // dual TypeLong::LONG |
33 |
} |
34 |
return w; |
35 |
} |