[ https://issues.apache.org/jira/browse/HARMONY5901?page=com.atlassian.jira.plugin.system.issuetabpanels:alltabpanel ]
Xiaoming Gu updated HARMONY5901:

Attachment: H5901V4.patch
The bug happened in spectralnorm_long is fixed. And a series of simple testcases about the replacement effect are passed. With the result tested on my workstation, spectralnorm_long is improved more than 29%, which is the benchmark dragging the total performance of Harmony most in http://www.stefankrause.net/wp/?p=9#more9.
> replace integer multiplication or division with shift if one of multipliers or divisor is a power of 2
> 
>
> Key: HARMONY5901
> URL: https://issues.apache.org/jira/browse/HARMONY5901
> Project: Harmony
> Issue Type: Improvement
> Components: DRLVM
> Reporter: Xiaoming Gu
> Attachments: 5901.patch, H5901V2.patch, H5901V3.patch, H5901V4.patch
>
>
> 1. Mulitiplication replacement
> a. It's about integer multiplication.
> b. One of two multipliers is a power of 2.
> c. The power of 2 could be negative.
> For example, 23*4 is transformed to 23<<2 and 23*(4) is transformed to (23<<2)*(1).
> 2. Division replacement
> a. It's about integer division.
> b. The divisor is a power of 2.
> c. The power of 2 could be negative.
> d. Because of roundup difference between division and shift right, the following equations from Aleksey are used.
> Baseline: q = a / (1 << d);
> Optimized: q = (a + [(1 << d)  1] & (a >> 31)) >> d;
> For example, 23/4 is transformed to (23+((1<<2)1)&(23>>31))>>2. and (23)/(4) is transformed to ((23+((1<<2)1)&(23>>31))>>2)*(1).
> 3. Comments for SAR and SHR swapped
> The comments for the two similar operations were misplaced in working_vm/vm/port/src/encoder/ia32_em64t.

This message is automatically generated by JIRA.

You can reply to this email to add a comment to the issue online.