Lines Matching defs:CInst
327 Instruction *CInst = BInst->getNextNode();
328 Instruction *DInst = CInst->getNextNode();
329 // CInst should have debug-info.
330 ASSERT_TRUE(CInst->DebugMarker);
331 EXPECT_FALSE(CInst->DebugMarker->StoredDbgRecords.empty());
335 CInst->moveBefore(BB, BeginIt2);
336 EXPECT_TRUE(!CInst->DebugMarker ||
337 CInst->DebugMarker->StoredDbgRecords.empty());
349 DInst->moveAfterPreserving(CInst);
358 CInst->moveBefore(BB, BB.begin());
359 EXPECT_TRUE(!CInst->DebugMarker ||
360 CInst->DebugMarker->StoredDbgRecords.empty());
362 EXPECT_EQ(&*BB.begin(), CInst);
363 EXPECT_EQ(CInst->getNextNode(), DInst);
366 CInst->moveBefore(BInst->getIterator());
370 // Now move CInst to the position of DInst, but using getIterator instead of
375 CInst->moveBefore(BB, DInst->getIterator());
376 // CInst gains the DbgVariableRecords.
379 EXPECT_FALSE(CInst->DebugMarker->StoredDbgRecords.empty());
380 EXPECT_EQ(&*BB.begin(), CInst);
416 Instruction *CInst = BInst->getNextNode();
417 Instruction *DInst = CInst->getNextNode();
420 ASSERT_TRUE(CInst->DebugMarker);
421 ASSERT_EQ(CInst->DebugMarker->StoredDbgRecords.size(), 1u);
422 DbgRecord *DVR1 = &*CInst->DebugMarker->StoredDbgRecords.begin();
428 auto Range1 = BInst->cloneDebugInfoFrom(CInst);
442 EXPECT_TRUE(CInst->hasDbgRecords());
451 CInst->dropOneDbgRecord(DVR1);
452 EXPECT_FALSE(CInst->hasDbgRecords());
453 EXPECT_EQ(CInst->DebugMarker->StoredDbgRecords.size(), 0u);
542 Instruction *BInst, *Branch, *CInst;
556 CInst = &*Dest;
563 cast<DbgVariableRecord>(&*CInst->DebugMarker->StoredDbgRecords.begin());
638 EXPECT_EQ(CInst->getParent(), BBExit);
642 EXPECT_TRUE(InstContainsDbgVariableRecord(CInst, DVRB));
691 EXPECT_EQ(CInst->getParent(), BBExit);
694 // DVRB: should be on CInst, in exit block.
695 EXPECT_TRUE(InstContainsDbgVariableRecord(CInst, DVRB));
700 // DVRConst should be behind / after the moved instructions, remain on CInst.
701 EXPECT_TRUE(InstContainsDbgVariableRecord(CInst, DVRConst));
704 EXPECT_TRUE(CheckDVROrder(CInst, {DVRB, DVRConst}));
747 EXPECT_EQ(CInst->getParent(), BBExit);
749 // DVRB: should be on CInst, in exit block.
750 EXPECT_TRUE(InstContainsDbgVariableRecord(CInst, DVRB));
802 EXPECT_EQ(CInst->getParent(), BBExit);
804 // DVRB: should be on CInst, in exit block.
805 EXPECT_TRUE(InstContainsDbgVariableRecord(CInst, DVRB));
811 // DVRConst should be behind the moved instructions, ahead of CInst.
812 EXPECT_TRUE(InstContainsDbgVariableRecord(CInst, DVRConst));
815 EXPECT_TRUE(CheckDVROrder(CInst, {DVRB, DVRConst}));
857 EXPECT_EQ(CInst->getParent(), BBExit);
913 EXPECT_EQ(CInst->getParent(), BBExit);
922 // DVRConst should be behind of the moved instructions, on CInst.
923 EXPECT_TRUE(InstContainsDbgVariableRecord(CInst, DVRConst));
967 EXPECT_EQ(CInst->getParent(), BBExit);
1021 EXPECT_EQ(CInst->getParent(), BBExit);
1030 // DVRConst should be after of the moved instructions, on CInst.
1031 EXPECT_TRUE(InstContainsDbgVariableRecord(CInst, DVRConst));
1078 EXPECT_EQ(CInst->getParent(), BBExit);
1085 EXPECT_TRUE(InstContainsDbgVariableRecord(CInst, DVRA));
1087 // DVRConst should be ahead of the moved DbgVariableRecord, on CInst.
1088 EXPECT_TRUE(InstContainsDbgVariableRecord(CInst, DVRConst));
1091 EXPECT_TRUE(CheckDVROrder(CInst, {DVRConst, DVRA}));
1132 EXPECT_EQ(CInst->getParent(), BBExit);
1139 EXPECT_TRUE(InstContainsDbgVariableRecord(CInst, DVRA));
1141 // DVRConst should be ahead of the moved DbgVariableRecord, on CInst.
1142 EXPECT_TRUE(InstContainsDbgVariableRecord(CInst, DVRConst));
1145 EXPECT_TRUE(CheckDVROrder(CInst, {DVRA, DVRConst}));