[DebugInfo] Remove redundant check in SimplifyCFG; NFC.

llvm-svn: 291813
This commit is contained in:
Robert Lougher 2017-01-12 21:11:09 +00:00
parent 1d8460755e
commit b0124c1eb8
1 changed files with 3 additions and 4 deletions

View File

@ -1275,10 +1275,9 @@ static bool HoistThenElseCodeToIf(BranchInst *BI,
LLVMContext::MD_mem_parallel_loop_access};
combineMetadata(I1, I2, KnownIDs);
// If the debug loc for I1 and I2 are different, as we are combining them
// into one instruction, we do not want to select debug loc randomly from
// I1 or I2.
if (!isa<CallInst>(I1) && I1->getDebugLoc() != I2->getDebugLoc())
// I1 and I2 are being combined into a single instruction. Its debug
// location is the merged locations of the original instructions.
if (!isa<CallInst>(I1))
I1->setDebugLoc(
DILocation::getMergedLocation(I1->getDebugLoc(), I2->getDebugLoc()));