[Statepoints] Refactor GCRelocateOperands into an intrinsic wrapper. NFC.
[oota-llvm.git] / lib / Transforms / InstCombine / InstCombineCalls.cpp
index e3634f269cf5f1dfa87354ae34624310da2817b8..090245d1b22c61464073b83c8a11c0df3fe56634 100644 (file)
@@ -1747,8 +1747,7 @@ Instruction *InstCombiner::visitCallInst(CallInst &CI) {
     // Translate facts known about a pointer before relocating into
     // facts about the relocate value, while being careful to
     // preserve relocation semantics.
-    GCRelocateOperands Operands(II);
-    Value *DerivedPtr = Operands.getDerivedPtr();
+    Value *DerivedPtr = cast<GCRelocateInst>(II)->getDerivedPtr();
     auto *GCRelocateType = cast<PointerType>(II->getType());
 
     // Remove the relocation if unused, note that this check is required