From 71e46835b826351815b94ca059756eaf65595fae Mon Sep 17 00:00:00 2001 From: Alon Zakai Date: Tue, 29 Apr 2014 13:39:45 -0700 Subject: fix bug where we tried to emit switches in fused multiples, which led to labels on ifs in some cases; fixes #2302 --- src/relooper/Relooper.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/relooper/Relooper.cpp b/src/relooper/Relooper.cpp index ce9232d9..cd001df9 100644 --- a/src/relooper/Relooper.cpp +++ b/src/relooper/Relooper.cpp @@ -17,6 +17,10 @@ typedef std::string ministring; #endif +// uncomment these out to get LLVM errs() debugging support +//#include +//using namespace llvm; + template static bool contains(const T& container, const U& contained) { return container.count(contained); } @@ -202,6 +206,7 @@ void Block::Render(bool InLoop) { if (Fused) { PrintDebug("Fusing Multiple to Simple\n"); Parent->Next = Parent->Next->Next; + Fused->UseSwitch = false; // TODO: emit switches here Fused->RenderLoopPrefix(); // When the Multiple has the same number of groups as we have branches, -- cgit v1.2.3-18-g5258