Mercurial > hg > graal-compiler
comparison src/share/vm/opto/cfgnode.cpp @ 9154:886d1fd67dc3
6443505: Ideal() function for CmpLTMask
Summary: Repair wrong code generation, added new matching rule
Reviewed-by: kvn, twisti
author | drchase |
---|---|
date | Fri, 12 Apr 2013 19:14:47 -0700 |
parents | d092d1b31229 |
children | 6f3fd5150b67 |
comparison
equal
deleted
inserted
replaced
9153:bc63dd2539a4 | 9154:886d1fd67dc3 |
---|---|
1 /* | 1 /* |
2 * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. | 2 * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. |
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. | 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
4 * | 4 * |
5 * This code is free software; you can redistribute it and/or modify it | 5 * This code is free software; you can redistribute it and/or modify it |
6 * under the terms of the GNU General Public License version 2 only, as | 6 * under the terms of the GNU General Public License version 2 only, as |
7 * published by the Free Software Foundation. | 7 * published by the Free Software Foundation. |
1304 op != Op_XorI && | 1304 op != Op_XorI && |
1305 op != Op_OrI*/ ) | 1305 op != Op_OrI*/ ) |
1306 return NULL; | 1306 return NULL; |
1307 | 1307 |
1308 Node *x = n2; | 1308 Node *x = n2; |
1309 Node *y = n1->in(1); | 1309 Node *y = NULL; |
1310 if( n2 == n1->in(1) ) { | 1310 if( x == n1->in(1) ) { |
1311 y = n1->in(2); | 1311 y = n1->in(2); |
1312 } else if( n2 == n1->in(1) ) { | 1312 } else if( x == n1->in(2) ) { |
1313 y = n1->in(1); | |
1313 } else return NULL; | 1314 } else return NULL; |
1314 | 1315 |
1315 // Not so profitable if compare and add are constants | 1316 // Not so profitable if compare and add are constants |
1316 if( q->is_Con() && phase->type(q) != TypeInt::ZERO && y->is_Con() ) | 1317 if( q->is_Con() && phase->type(q) != TypeInt::ZERO && y->is_Con() ) |
1317 return NULL; | 1318 return NULL; |