I3N2W6: fix overflow when strength reducing interger multiply
This commit is contained in:
parent
f8427a2ebb
commit
c574f34416
@ -12,11 +12,11 @@ index 6d0b4acbd..ecd4bd4a6 100644
|
||||
- right.load_item();
|
||||
+ jint c = right.get_jint_constant();
|
||||
+ if (c > 0 && c < max_jint && (is_power_of_2(c) || is_power_of_2(c - 1) || is_power_of_2(c + 1))) {
|
||||
+ right.dont_load_item();
|
||||
+ right_arg->dont_load_item();
|
||||
} else {
|
||||
- right.dont_load_item();
|
||||
+ // Cannot use constant op.
|
||||
+ right_arg->load_item();
|
||||
+ right_arg->load_item();
|
||||
}
|
||||
} else {
|
||||
right.load_item();
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user