Mercurial > hg > truffle
comparison src/share/vm/opto/connode.cpp @ 755:36ee9b69616e
6833879: Assigning positive zero is ignored when old value is negative zero
Summary: Don't perform CMOVE identity optimization for floating point types
Reviewed-by: kvn, never
author | cfang |
---|---|
date | Tue, 05 May 2009 11:02:10 -0700 |
parents | 660978a2a31a |
children | 93c14e5562c4 |
comparison
equal
deleted
inserted
replaced
754:2b25645dab33 | 755:36ee9b69616e |
---|---|
126 if( (phase->eqv(cmp->in(1),f) && | 126 if( (phase->eqv(cmp->in(1),f) && |
127 phase->eqv(cmp->in(2),t)) || | 127 phase->eqv(cmp->in(2),t)) || |
128 // Swapped Cmp is OK | 128 // Swapped Cmp is OK |
129 (phase->eqv(cmp->in(2),f) && | 129 (phase->eqv(cmp->in(2),f) && |
130 phase->eqv(cmp->in(1),t)) ) { | 130 phase->eqv(cmp->in(1),t)) ) { |
131 // Give up this identity check for floating points because it may choose incorrect | |
132 // value around 0.0 and -0.0 | |
133 if ( cmp->Opcode()==Op_CmpF || cmp->Opcode()==Op_CmpD ) | |
134 return NULL; | |
131 // Check for "(t==f)?t:f;" and replace with "f" | 135 // Check for "(t==f)?t:f;" and replace with "f" |
132 if( b->_test._test == BoolTest::eq ) | 136 if( b->_test._test == BoolTest::eq ) |
133 return f; | 137 return f; |
134 // Allow the inverted case as well | 138 // Allow the inverted case as well |
135 // Check for "(t!=f)?t:f;" and replace with "t" | 139 // Check for "(t!=f)?t:f;" and replace with "t" |