I need help interpreting this compiler optimization:
;R12 = 0x88888889;
UMULL LR, R2, R12, R3 ; R3 * 0x88888889;
MOV R2, R2,LSR#3 ; ((R3 * 0x88888889 << 32) >> 3)
RSB R2, R2, R2,LSL#4 ; (R3 * 0x88888889 >> 32 >> 3) << 16
RSB R2, R2, R3,LSL#1 ; (R3 << 1) - ((R3 * 0x88888889 >> 32 >> 3) << 16);
currently i interpreted this like so (not sure it is correct):
(R3 * 2) - ((R3 * 0x88888889 * 120) / 0xFFFFFFFF);
I found that it maybe integer division, I hope someone can help me understand this optimization better
Thanks.