comparison src/share/vm/opto/subnode.cpp @ 14909:4ca6dc0799b6

Backout jdk9 merge
author Gilles Duboscq <duboscq@ssw.jku.at>
date Tue, 01 Apr 2014 13:57:07 +0200
parents cd5d10655495
children 89152779163c
comparison
equal deleted inserted replaced
14908:8db6e76cb658 14909:4ca6dc0799b6
1 /* 1 /*
2 * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. 2 * Copyright (c) 1997, 2012, 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.
1124 // Change "bool tst (cmp con x)" into "bool ~tst (cmp x con)". 1124 // Change "bool tst (cmp con x)" into "bool ~tst (cmp x con)".
1125 // This moves the constant to the right. Helps value-numbering. 1125 // This moves the constant to the right. Helps value-numbering.
1126 Node *cmp = in(1); 1126 Node *cmp = in(1);
1127 if( !cmp->is_Sub() ) return NULL; 1127 if( !cmp->is_Sub() ) return NULL;
1128 int cop = cmp->Opcode(); 1128 int cop = cmp->Opcode();
1129 if( cop == Op_FastLock || cop == Op_FastUnlock) return NULL; 1129 if( cop == Op_FastLock || cop == Op_FastUnlock || cop == Op_FlagsProj) return NULL;
1130 Node *cmp1 = cmp->in(1); 1130 Node *cmp1 = cmp->in(1);
1131 Node *cmp2 = cmp->in(2); 1131 Node *cmp2 = cmp->in(2);
1132 if( !cmp1 ) return NULL; 1132 if( !cmp1 ) return NULL;
1133
1134 if (_test._test == BoolTest::overflow || _test._test == BoolTest::no_overflow) {
1135 return NULL;
1136 }
1137 1133
1138 // Constant on left? 1134 // Constant on left?
1139 Node *con = cmp1; 1135 Node *con = cmp1;
1140 uint op2 = cmp2->Opcode(); 1136 uint op2 = cmp2->Opcode();
1141 // Move constants to the right of compare's to canonicalize. 1137 // Move constants to the right of compare's to canonicalize.