From 43d57558bafccff3ec3c5aecb201d7a8a57b2435 Mon Sep 17 00:00:00 2001 From: Vladimir Marko Date: Mon, 7 Sep 2020 12:30:17 +0000 Subject: Do not build intrinsic graph for signature polymorphic methods. The InstructionBuilder cannot build HInvokePolymorphic for an intrinsic graph. It would be rather useless to allow this as signature polymorphic method intrinsics always need the slow-path for unhandled cases, and we would therefore reject the compiled code anyway. Instead, prevent the construction of the intrinsic graph for signature polymorphic methods. Test: testrunner.py --host --optimizing -t 712-varhandle-invocations Bug: 65872996 Change-Id: Id82f1f282383dbd45d6db2bd2a96d838b685d7ed --- compiler/optimizing/instruction_builder.cc | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'compiler/optimizing/instruction_builder.cc') diff --git a/compiler/optimizing/instruction_builder.cc b/compiler/optimizing/instruction_builder.cc index a3630afd6f..d264bee736 100644 --- a/compiler/optimizing/instruction_builder.cc +++ b/compiler/optimizing/instruction_builder.cc @@ -452,6 +452,10 @@ bool HInstructionBuilder::Build() { void HInstructionBuilder::BuildIntrinsic(ArtMethod* method) { DCHECK(!code_item_accessor_.HasCodeItem()); DCHECK(method->IsIntrinsic()); + if (kIsDebugBuild) { + ScopedObjectAccess soa(Thread::Current()); + CHECK(!method->IsSignaturePolymorphic()); + } locals_for_.resize( graph_->GetBlocks().size(), -- cgit v1.2.3-59-g8ed1b