File size: 1,439 Bytes
ff994b2 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 |
diff --git a/src/coreclr/src/zap/zapinfo.cpp b/src/coreclr/src/zap/zapinfo.cpp
index 48d30834b8e241..3b229470e913eb 100644
--- a/src/coreclr/src/zap/zapinfo.cpp
+++ b/src/coreclr/src/zap/zapinfo.cpp
@@ -2147,13 +2147,15 @@ DWORD FilterNamedIntrinsicMethodAttribs(ZapInfo* pZapInfo, DWORD attribs, CORINF
// is because they often change the code they emit based on what ISAs are supported by the compiler,
// but we don't know what the target machine will support.
//
- // Additionally, we make sure none of the hardware intrinsic method bodies get pregenerated in crossgen
+ // Additionally, we make sure none of the hardware intrinsic method bodies (except ARM64) get pregenerated in crossgen
// (see ZapInfo::CompileMethod) but get JITted instead. The JITted method will have the correct
// answer for the CPU the code is running on.
-#if defined(TARGET_ARM64)
+
+ // For Arm64, AdvSimd/ArmBase is the baseline that is suported and hence we do pregenerate the method bodies
+ // of ARM4 harware intrinsic.
fTreatAsRegularMethodCall = (fIsGetIsSupportedMethod && fIsPlatformHWIntrinsic);
-#else
- fTreatAsRegularMethodCall = (fIsGetIsSupportedMethod && fIsPlatformHWIntrinsic) || (!fIsPlatformHWIntrinsic && fIsHWIntrinsic);
+#if !defined(TARGET_ARM64)
+ fTreatAsRegularMethodCall |= (!fIsPlatformHWIntrinsic && fIsHWIntrinsic);
#endif
|