Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions src/hotspot/share/opto/subnode.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1398,6 +1398,21 @@ const Type *BoolTest::cc2logical( const Type *CC ) const {
return TypeInt::BOOL;
}

BoolTest::mask BoolTest::unsigned_mask(BoolTest::mask btm) {
switch(btm) {
case eq:
case ne:
return btm;
case lt:
case le:
case gt:
case ge:
return mask(btm | unsigned_compare);
default:
ShouldNotReachHere();
}
}

//------------------------------dump_spec-------------------------------------
// Print special per-node info
void BoolTest::dump_on(outputStream *st) const {
Expand Down
2 changes: 1 addition & 1 deletion src/hotspot/share/opto/subnode.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -331,7 +331,7 @@ struct BoolTest {
mask negate( ) const { return negate_mask(_test); }
// Return the negative mask for the given mask, for both signed and unsigned comparison.
static mask negate_mask(mask btm) { return mask(btm ^ 4); }
static mask unsigned_mask(mask btm) { return mask(btm | unsigned_compare); }
static mask unsigned_mask(mask btm);
bool is_canonical( ) const { return (_test == BoolTest::ne || _test == BoolTest::lt || _test == BoolTest::le || _test == BoolTest::overflow); }
bool is_less( ) const { return _test == BoolTest::lt || _test == BoolTest::le; }
bool is_greater( ) const { return _test == BoolTest::gt || _test == BoolTest::ge; }
Expand Down
Loading