[llvm] r202129 - [SROA] Fix a *glaring* bug in r202091: you have to actually *write*

Chandler Carruth chandlerc at gmail.com
Tue Feb 25 01:45:27 PST 2014


Author: chandlerc
Date: Tue Feb 25 03:45:27 2014
New Revision: 202129

URL: http://llvm.org/viewvc/llvm-project?rev=202129&view=rev
Log:
[SROA] Fix a *glaring* bug in r202091: you have to actually *write*
the break statement, not just think it to yourself....

No idea how this worked at all, much less survived most bots, my
bootstrap, and some bot bootstraps!

The Polly one didn't survive, and this was filed as PR18959. I don't
have a reduced test case and honestly I'm not seeing the need. What we
probably need here are better asserts / debug-build behavior in
SmallPtrSet so that this madness doesn't make it so far.

Modified:
    llvm/trunk/lib/Transforms/Scalar/SROA.cpp

Modified: llvm/trunk/lib/Transforms/Scalar/SROA.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Scalar/SROA.cpp?rev=202129&r1=202128&r2=202129&view=diff
==============================================================================
--- llvm/trunk/lib/Transforms/Scalar/SROA.cpp (original)
+++ llvm/trunk/lib/Transforms/Scalar/SROA.cpp Tue Feb 25 03:45:27 2014
@@ -3169,6 +3169,7 @@ bool SROA::rewritePartition(AllocaInst &
       Promotable = false;
       PHIUsers.clear();
       SelectUsers.clear();
+      break;
     }
   for (SmallPtrSetImpl<SelectInst *>::iterator I = SelectUsers.begin(),
                                                E = SelectUsers.end();
@@ -3177,6 +3178,7 @@ bool SROA::rewritePartition(AllocaInst &
       Promotable = false;
       PHIUsers.clear();
       SelectUsers.clear();
+      break;
     }
 
   if (Promotable) {





More information about the llvm-commits mailing list