[aarch64-port-dev ] Unnecessary branch in MacroAssembler::corrected_idivl

D.Sturm D.Sturm42 at gmail.com
Wed Mar 26 01:08:22 UTC 2014


Hi,
since I'm checking special cases, etc. in the Graal compiler generated code
I generally also check the HotSpot code to see if it does equivalent
things. Is it actually useful if I report small discrepances where it seems
HotSpot generates inefficient code such as the following?

Anyhow, since we're already at it - according to the ARMv8 ISA for division:
"If a signed integer division (INT_MIN ÷ -1) is performed, where INT_MIN is
the most negative integer value representable in the selected register
size, then the result will overflow the signed integer range. No indication
of this overflow is produced and the result written to the destination
register will be INT_MIN."

So the special case for INT_MIN / -1 in MacroAssembler::corrected_idivl is
unnecessary since that fits exactly the JLS definition for division.

-- Daniel


More information about the aarch64-port-dev mailing list