From a386152985a9812acfaea617ed278d0c5adb1210 Mon Sep 17 00:00:00 2001
From: clc5q <clc5q@git.zephyr-software.com>
Date: Wed, 7 May 2008 01:00:08 +0000
Subject: [PATCH] Fix propagation of Phi DEFs by resetting the block processed
 flags first.

---
 SMPBasicBlock.cpp | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/SMPBasicBlock.cpp b/SMPBasicBlock.cpp
index 272c2826..55d37383 100644
--- a/SMPBasicBlock.cpp
+++ b/SMPBasicBlock.cpp
@@ -1102,10 +1102,11 @@ set<SMPPhiFunction, LessPhi>::iterator SMPBasicBlock::InferPhiDefType(set<SMPPhi
 		}
 	}
 	// Must have seen consistent types if we reach this point.
-	ReturnPhi = this->SetPhiDefType(DefPhi->GetAnyOp(), UseType);
+	ReturnPhi = this->SetPhiDefType(DefOp, UseType);
 	changed = true;
 	// Propagate down to USEs of this DEF.
 	if (!MDIsIndirectMemoryOpnd(DefOp, this->MyFunc->UsesFramePointer()))
+		this->MyFunc->ResetProcessedBlocks();
 		changed |= this->PropagateGlobalDefType(DefOp, UseType, SSANum);
 	return ReturnPhi;
 } // end of SMPBasicBlock::InferPhiDefType()
-- 
GitLab