Mercurial > hg > graal-compiler
comparison src/share/vm/opto/subnode.cpp @ 17726:085b304a1cc5
8027754: Enable loop optimizations for loops with MathExact inside
Reviewed-by: kvn, iveresov
author | rbackman |
---|---|
date | Thu, 23 Jan 2014 12:08:28 +0100 |
parents | 55fb97c4c58d |
children | 4ca6dc0799b6 968a17f18337 78bbf4d43a14 |
comparison
equal
deleted
inserted
replaced
17725:b4ce4e9eb97d | 17726:085b304a1cc5 |
---|---|
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 || cop == Op_FlagsProj) return NULL; | 1129 if( cop == Op_FastLock || cop == Op_FastUnlock) 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 } | |
1133 | 1137 |
1134 // Constant on left? | 1138 // Constant on left? |
1135 Node *con = cmp1; | 1139 Node *con = cmp1; |
1136 uint op2 = cmp2->Opcode(); | 1140 uint op2 = cmp2->Opcode(); |
1137 // Move constants to the right of compare's to canonicalize. | 1141 // Move constants to the right of compare's to canonicalize. |