webrev for HSAIL backend Math intrinsics support

Venkatachalam, Vasanth Vasanth.Venkatachalam at amd.com
Thu Dec 12 11:35:26 PST 2013


I've uploaded a webrev that adds support to the HSAIL backend for intrinsifying some of the java.lang.Math routines.


Please review and provide feedback. When ready for commit, please commit it in my name.

Implementation Notes:

1)      The java.lang.Math routines that are covered in this webrev include Math.sqrt, Math.abs, Math.rint, Math.floor, and Math.ceil.

Based on the HSAIL spec and the precision requirements of Java these are the most straightforward to implement.

2)      The main changes are the addition of an HSAILMathSubstitutions class and an HSAILMathIntrinsicNode to define the new intrinsics, and supporting changes in HSAILLIRGenerator and HSAILArithmetic to handle the code generation.

3)      Test cases have been included for testing each of the intrinsics included in this webrev. The tests exercise positive and negative values as well as corner cases mentioned in the java.lang.Math spec for the above five routines.


More information about the graal-dev mailing list