ART: Add entrypoint and intrinsic for Math.pow().
MathBenchmarks.java#timePow results on taimen's little cores
fixed at frequency 1401600 with forced JIT compilation:
- before:
- X32: 356.33 (@FastNative), 315.39 (@CriticalNative)
- X64: 357.31 (@FastNative), 315.37 (@CriticalNative)
- after (LICM defeats the benchmark):
- X32: 2.88
- X64: 2.87
- after but with kAllSideEffects to prevent LICM:
- X32: 275.42
- X64: 275.67
Test: Rely on TreeHugger.
Bug: 70727450
Change-Id: Iaa31f70acabbd57c163cfeafe02eed67c1348861
diff --git a/compiler/optimizing/intrinsics_arm_vixl.cc b/compiler/optimizing/intrinsics_arm_vixl.cc
index 99b8b5d..830d040 100644
--- a/compiler/optimizing/intrinsics_arm_vixl.cc
+++ b/compiler/optimizing/intrinsics_arm_vixl.cc
@@ -2811,6 +2811,14 @@
GenFPFPToFPCall(invoke, GetAssembler(), codegen_, kQuickAtan2);
}
+void IntrinsicLocationsBuilderARMVIXL::VisitMathPow(HInvoke* invoke) {
+ CreateFPFPToFPCallLocations(allocator_, invoke);
+}
+
+void IntrinsicCodeGeneratorARMVIXL::VisitMathPow(HInvoke* invoke) {
+ GenFPFPToFPCall(invoke, GetAssembler(), codegen_, kQuickPow);
+}
+
void IntrinsicLocationsBuilderARMVIXL::VisitMathHypot(HInvoke* invoke) {
CreateFPFPToFPCallLocations(allocator_, invoke);
}