8081823: C2 performs unsigned comparison against -1 (original) (raw)
Roland Westrelin roland.westrelin at oracle.com
Mon Jun 8 15:38:40 UTC 2015
- Previous message: Question on C1's as_ValueType(ciConstant value)
- Next message: 8081823: C2 performs unsigned comparison against -1
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
http://cr.openjdk.java.net/~roland/8081823/webrev.00/
C2 folds:
if (i <= a || i > b) {
as:
if (i - a - 1 >u b - a - 1) {
a == b is allowed and the test becomes then if (i-1 >u -1) { which is never true.
Same is true with if (i > b || i <= a) {
The fix folds it as:
if (i - a - 1 >=u b - a) {
which is always true for a == b
Roland.
- Previous message: Question on C1's as_ValueType(ciConstant value)
- Next message: 8081823: C2 performs unsigned comparison against -1
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the hotspot-compiler-dev mailing list