diff options
Diffstat (limited to 'compiler/optimizing/intrinsics.h')
-rw-r--r-- | compiler/optimizing/intrinsics.h | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/compiler/optimizing/intrinsics.h b/compiler/optimizing/intrinsics.h index d14d264204..0a431b8aa8 100644 --- a/compiler/optimizing/intrinsics.h +++ b/compiler/optimizing/intrinsics.h @@ -177,6 +177,17 @@ static inline bool IsIntrinsicWithSpecializedHir(Intrinsics intrinsic) { } } +static inline bool IsValidIntrinsicAfterBuilder(Intrinsics intrinsic) { + return !IsIntrinsicWithSpecializedHir(intrinsic) || + // FIXME: The inliner can currently create graphs with any of the intrinsics with HIR. + // However, we are able to compensate for `StringCharAt` and `StringLength` in the + // `HInstructionSimplifier`, so we're allowing these two intrinsics for now, preserving + // the old behavior. Besides fixing the bug, we should also clean up the simplifier + // and remove `SimplifyStringCharAt` and `SimplifyStringLength`. Bug: 319045458 + intrinsic == Intrinsics::kStringCharAt || + intrinsic == Intrinsics::kStringLength; +} + #define GENERIC_OPTIMIZATION(name, bit) \ public: \ void Set##name() { SetBit(k##name); } \ |