mirror of
https://github.com/openjdk/jdk.git
synced 2026-08-03 06:35:31 +00:00
8385855: C2: IfNode::filtered_int_type should only allow CmpI
Reviewed-by: qamai Backport-of: 841e28822200103088c04d07b551537630ea79c4
This commit is contained in:
parent
b2b8de85d6
commit
abccea5e2c
@ -669,9 +669,11 @@ const TypeInt* IfNode::filtered_int_type(PhaseGVN* gvn, Node* val, Node* if_proj
|
||||
BoolNode* bol = iff->in(1)->as_Bool();
|
||||
if (bol->in(1) && bol->in(1)->is_Cmp()) {
|
||||
const CmpNode* cmp = bol->in(1)->as_Cmp();
|
||||
// Val is always the lhs of the comparision: val <test> cmp2
|
||||
if (cmp->in(1) == val) {
|
||||
assert(cmp->Opcode() == Op_CmpI, "signed comparison required");
|
||||
// Val is always the lhs of the comparision: val CmpI cmp2
|
||||
if (cmp->Opcode() == Op_CmpI && cmp->in(1) == val) {
|
||||
// Only CmpI allowed, assumed by signed logic below.
|
||||
// We could extend to CmpU in the future, and would
|
||||
// have to implement unsigned range logic below.
|
||||
const TypeInt* cmp2_t = gvn->type(cmp->in(2))->isa_int();
|
||||
if (cmp2_t != nullptr) {
|
||||
jint lo = cmp2_t->_lo;
|
||||
|
||||
1117
test/hotspot/jtreg/compiler/loopopts/TestHasTruncationWrap.java
Normal file
1117
test/hotspot/jtreg/compiler/loopopts/TestHasTruncationWrap.java
Normal file
File diff suppressed because it is too large
Load Diff
Loading…
x
Reference in New Issue
Block a user