Fix Reference.refersTo() intrinsic for heap poisoning.

Test: ART_HEAP_POISONING=true m test-art-host-gtest
Test: ART_HEAP_POISONING=true testrunner.py --host --optimizing
Test: run-gtests.sh # with ART_HEAP_POISONING=true
Test: testrunner.py --target --optimizing # with ART_HEAP_POISONING=true
Bug: 172573708
Change-Id: I2e09b49813bdad40c1e18bf5681ba2094c5a40c1
diff --git a/compiler/optimizing/intrinsics_x86.cc b/compiler/optimizing/intrinsics_x86.cc
index cda3500..a4f1bd1 100644
--- a/compiler/optimizing/intrinsics_x86.cc
+++ b/compiler/optimizing/intrinsics_x86.cc
@@ -3184,6 +3184,7 @@
 
   __ movl(out, Address(obj, referent_offset));
   codegen_->MaybeRecordImplicitNullCheck(invoke);
+  __ MaybeUnpoisonHeapReference(out);
   // Note that the fence is a no-op, thanks to the x86 memory model.
   codegen_->GenerateMemoryBarrier(MemBarrierKind::kLoadAny);  // `referent` is volatile.