[PATCH] Switch To Select optimization , fixed case with multiple incoming edges from same block

Marcello Maggioni hayarms at gmail.com
Mon Oct 13 16:01:23 PDT 2014


================
Comment at: lib/Transforms/Utils/SimplifyCFG.cpp:3575
@@ +3574,3 @@
+  BasicBlock *SelectBB = SI->getParent();
+  while (PHI->getBasicBlockIndex(SelectBB) >= 0)
+    PHI->removeIncomingValue(SelectBB);
----------------
hans wrote:
> kariddi wrote:
> > This is the only thing that changed from the previous patch, with this becoming a "while" from an "if"
> Can you add a test case that covers this?
Done! Thanks!

http://reviews.llvm.org/D5746






More information about the llvm-commits mailing list