[llvm-commits] [llvm] r108137 - /llvm/trunk/lib/Transforms/Scalar/TailDuplication.cpp
Gabor Greif
ggreif at gmail.com
Mon Jul 12 05:02:10 PDT 2010
Author: ggreif
Date: Mon Jul 12 07:02:10 2010
New Revision: 108137
URL: http://llvm.org/viewvc/llvm-project?rev=108137&view=rev
Log:
recommit r108131 (hich has been backed out in r108135) with a fix
Modified:
llvm/trunk/lib/Transforms/Scalar/TailDuplication.cpp
Modified: llvm/trunk/lib/Transforms/Scalar/TailDuplication.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Scalar/TailDuplication.cpp?rev=108137&r1=108136&r2=108137&view=diff
==============================================================================
--- llvm/trunk/lib/Transforms/Scalar/TailDuplication.cpp (original)
+++ llvm/trunk/lib/Transforms/Scalar/TailDuplication.cpp Mon Jul 12 07:02:10 2010
@@ -206,12 +206,13 @@
// there is only one other pred, get it, otherwise we can't handle it.
PI = pred_begin(DstBlock); PE = pred_end(DstBlock);
BasicBlock *DstOtherPred = 0;
- if (*PI == SrcBlock) {
+ BasicBlock *P = *PI;
+ if (P == SrcBlock) {
if (++PI == PE) return 0;
DstOtherPred = *PI;
if (++PI != PE) return 0;
} else {
- DstOtherPred = *PI;
+ DstOtherPred = P;
if (++PI == PE || *PI != SrcBlock || ++PI != PE) return 0;
}
More information about the llvm-commits
mailing list