[PATCH] Switch To Select optimization , fixed case with multiple incoming edges from same block
Hans Wennborg
hans at chromium.org
Mon Oct 13 11:00:13 PDT 2014
After reading the discussion on the previous commit thread, the description doesn't sound completely accurate. I.e. it seems like multiple edges from a bb to a phi is allowed as long as they have the same value.
================
Comment at: lib/Transforms/Utils/SimplifyCFG.cpp:3575
@@ +3574,3 @@
+ BasicBlock *SelectBB = SI->getParent();
+ while (PHI->getBasicBlockIndex(SelectBB) >= 0)
+ PHI->removeIncomingValue(SelectBB);
----------------
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?
http://reviews.llvm.org/D5746
More information about the llvm-commits
mailing list