diff options
author | Robert Lougher <rob.lougher@gmail.com> | 2017-01-12 21:11:09 +0000 |
---|---|---|
committer | Robert Lougher <rob.lougher@gmail.com> | 2017-01-12 21:11:09 +0000 |
commit | b0124c1eb87881d611f2f578a3e619b29325e457 (patch) | |
tree | 07caf5d627f6d8629a957ffbf36e9303af3c55fc /llvm/lib | |
parent | 1d8460755e9b95517162dc410b7293cd63f8f90e (diff) | |
download | bcm5719-llvm-b0124c1eb87881d611f2f578a3e619b29325e457.tar.gz bcm5719-llvm-b0124c1eb87881d611f2f578a3e619b29325e457.zip |
[DebugInfo] Remove redundant check in SimplifyCFG; NFC.
llvm-svn: 291813
Diffstat (limited to 'llvm/lib')
-rw-r--r-- | llvm/lib/Transforms/Utils/SimplifyCFG.cpp | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/llvm/lib/Transforms/Utils/SimplifyCFG.cpp b/llvm/lib/Transforms/Utils/SimplifyCFG.cpp index 01bfd123014..6e30919246c 100644 --- a/llvm/lib/Transforms/Utils/SimplifyCFG.cpp +++ b/llvm/lib/Transforms/Utils/SimplifyCFG.cpp @@ -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())); |