ARM64: Splitting GenerateDivRem* functions into GenerateIntDiv and GenerateIntRem functions
VisitDiv and VisitRem call GenerateDivRemIntegral. GenerateDivRemIntegral does not know whether it is invoked for HDiv or HRem and has to check this. As a result all GenerateDivRem* functions have such checks. Code for optimizing HRem and HDiv, e.g. a denominator is power of 2, can be specific for HRem or HDiv. So having it in GenerateDivRem would create issues with code maintenance. This patch split GenerateDivRem* functions into GenerateIntDiv* and GenerateIntRem. BTW 'Integral' meaning is not 'Integer'. So changed it as well. It also removes the case 'division by 1 or -1' because the case is handled in InstructionSimplifierVisitor. As there is a commonly used function Int64ConstantFrom(Location) it is used instead of Int64FromConstant(HConstant). This removes some code as well. Test: 012-math, 014-math3, 411-optimizing-arith Test: test-art-host, test-art-target Change-Id: I972129b24a206c8230d304be551cd2c18dbc7c9c
Loading
Please sign in to comment