From 899a605fc19df8f6b80f2e5e55512d04aee10c5a Mon Sep 17 00:00:00 2001 From: Ekaterina Romanova Date: Wed, 26 Mar 2014 22:15:28 +0000 Subject: This is a fix for PR# 19051. I noticed code gen differences due to code motion when running tests with and without the debug info at O2. The problem is in branch folding. A loop wanted to skip the debug info, but actually it didn't do so. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@204865 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/CodeGen/BranchFolding.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/CodeGen') diff --git a/lib/CodeGen/BranchFolding.cpp b/lib/CodeGen/BranchFolding.cpp index fe8baeabc4..bf6d56ceac 100644 --- a/lib/CodeGen/BranchFolding.cpp +++ b/lib/CodeGen/BranchFolding.cpp @@ -1515,7 +1515,7 @@ MachineBasicBlock::iterator findHoistingInsertPosAndDeps(MachineBasicBlock *MBB, // branch from condition setting instruction. MachineBasicBlock::iterator PI = Loc; --PI; - while (PI != MBB->begin() && Loc->isDebugValue()) + while (PI != MBB->begin() && PI->isDebugValue()) --PI; bool IsDef = false; -- cgit v1.2.3