JIT baseline: Don't update the inline cache for an intrinsic.
We already know its target.
Test: 597-deopt-busy-loop with heap poisoning
Bug: 119800099
Change-Id: Ic0bd780b48e6ee31e2007c04528476fcb7fcc5bf
diff --git a/compiler/optimizing/code_generator_x86.cc b/compiler/optimizing/code_generator_x86.cc
index ac36ce3..54da879 100644
--- a/compiler/optimizing/code_generator_x86.cc
+++ b/compiler/optimizing/code_generator_x86.cc
@@ -2298,7 +2298,12 @@
void CodeGeneratorX86::MaybeGenerateInlineCacheCheck(HInstruction* instruction, Register klass) {
DCHECK_EQ(EAX, klass);
- if (GetCompilerOptions().IsBaseline() && !Runtime::Current()->IsAotCompiler()) {
+ // We know the destination of an intrinsic, so no need to record inline
+ // caches (also the intrinsic location builder doesn't request an additional
+ // temporary).
+ if (!instruction->GetLocations()->Intrinsified() &&
+ GetCompilerOptions().IsBaseline() &&
+ !Runtime::Current()->IsAotCompiler()) {
DCHECK(!instruction->GetEnvironment()->IsFromInlinedInvoke());
ScopedObjectAccess soa(Thread::Current());
ProfilingInfo* info = GetGraph()->GetArtMethod()->GetProfilingInfo(kRuntimePointerSize);